Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 External Development Forums - SalesLogix OLEDB Provider
Forum to discuss using the SalesLogix OLE DB Provider from external applications (including usage of built-in provider procedures). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix OLEDB Provider | New ThreadView:  Search:  
 Author  Thread: (RESOLVED) Generate Table Id's W/Out slxCreateIDFor
lmf232s
Posts: 3
 
(RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Sep 07 9:44 AM
Im in a position where I will need to be able to create the Table Id's from a website. The server that this site will sit on will not have the slx provider on it so I will be creating the Id's with a function that I created. This function uses the SITEKEYS table to get the current KeyValue and then increament that number. I have figured out the logic behind it and it all seems to be working correclty.

The problem that im having is this, Im not sure which SITEKEY belongs to the QUOTEMAIN TABLE. All the other tables that I will be using (Account, Contact, Address) are labeled so they stand out but the QUOTE table does not. In looking at the ID's of the Quotemain Table it appears that it may be using the SITEKEY with the KeyDesc of 'Other' as this is the only KeyValue that starts with or is even close to 'A00F'. That being said Im not sure that this is where the QuoteMain Table is getting its KeyValue from and I was wondering if any one knew for sure.

I guess I can generate a quote real quick and see if it increaments the 'Other' field but I thought I would ask.
[Reply][Quote]
lmf232s
Posts: 3
 
Re: Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Sep 07 9:50 AM
Ok sorry for the post. I guess I should of just created an ID for the QuoteMain Table and then compared the DB value to the Id that was created.

The QuoteMain Id is generated from the KeyDesc field of Other (at least this is the case with my version of SLX which I have no idea which version it is).

Thats it
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: (RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Sep 07 7:23 AM
Quote:
Originally posted by lmf232s

Im in a position where I will need to be able to create the Table Id's from a website. The server that this site will sit on will not have the slx provider on it so I will be creating the Id's with a function that I created. This function uses the SITEKEYS table to get the current KeyValue and then increament that number. I have figured out the logic behind it and it all seems to be working correclty.

The problem that im having is this, Im not sure which SITEKEY belongs to the QUOTEMAIN TABLE. All the other tables that I will be using (Account, Contact, Address) are labeled so they stand out but the QUOTE table does not. In looking at the ID's of the Quotemain Table it appears that it may be using the SITEKEY with the KeyDesc of 'Other' as this is the only KeyValue that starts with or is even close to 'A00F'. That being said Im not sure that this is where the QuoteMain Table is getting its KeyValue from and I was wondering if any one knew for sure.

I guess I can generate a quote real quick and see if it increaments the 'Other' field but I thought I would ask.


This is a very dangerous practice and you could easily trash sitekeys.

Yes.. all custom 1:m tables use the "Other" key (and so do a bunch of SalesLogix tables).

Why can't you do a provider connection? You seem to be able to do a normal SQL connection.. just load the provider. It's available as a stand-alone install.
--
rjl
[Reply][Quote]
Brian Thews
Posts: 34
 
Re: (RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Sep 07 8:10 AM
I need to do something similar here for a data migration project - can I get a new ID from a stored procedure? Or am I always having to get it from code?
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: (RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Sep 07 8:52 AM
inspite of getting so many requests to get the IDs created thru some sql technique as opposed to an SP in the provider , sage has not provided with a legit way to get it created.All the techniques that we do is totally unsupported and they wouldn't waste 2 secs in telling you that your on your own there...

rj, why dont you tech partners out there ask sage to come up with some new features lilke this atleast for ppl with sql 2005(an sp in a .net lang which will do this same trick)
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: (RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Sep 07 6:47 AM
Nandu, Using the provider is the prefered method. For the mobile product keys are generated on the device using the 'prefix-SiteCode-Base36Increment 7 charactervalue' specification. More specifically the key ids are determined at the high order. Since there are 7 base 36, the ID's are started at Z000000 allowing a huge range of numbers in between and making pretty safe to be up there.

Mark
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: (RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Sep 07 1:06 PM
7 base 36 ? what is that numbering system? if it is the regular base36 which starts with A000000 , then isnt it what slx is doing when they start the numbering process?

and defnitely i didnt take mobile into account when i was talking about exposing that id generator thru a sql sp.My expirience with mobile is limited to being a corporate enterprise BB user ..

if deployed thru an sp, is that going to hurt the overall architecture of slx that much?whats the harm in having multiple ways to genarate the IDs?

while we are at this i have another one.....i have heard that for java apps to use the slx oledbprovider , there has to be another type2 driver which can handle the incoming jdbc calls.Is this true? if so why is sage not keen of integrating the java systems with slx data thru a separate type2 driver ?

thanks!
-nandu

[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: (RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Sep 07 6:45 PM
Doesn't this problem go away if you set the PK to auto-generate and then do inserts using the provider? Why worry about separate SPs?

SLX has never been very good at using extended SQL Server functionality - and given that it works with Oracle too, I understand why. Once you accept this, you can learn to live with the consequent limitations - well, I have anyway. Don't get me wrong - I have a SQL Server background and it is sometimes *incredibly* frustrating not to be able to use some of the horsepower that raw SQL Server can provide.
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: (RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Sep 07 7:57 AM
Nandu,

For your Java questions I really do not have any idea. All my server side development is in .net so I have never come up with that edge case. I also do not know of anywork that the Sage SalesLogix team is doing with Java so being keen to integrate through drivers is more then likely outside the scope of what they are doing (IMHO). Regular Base 36 does not have to start with A000000, it can start with 000000. Note the key is made up of a prefix (A) then a site Code (EA12) and then the numbering auto incremented. So the whole key is AEA120000000. The biggest harm in having multiple ways of generating keys is possible key collision for inserts. Thats why the Mobile keys are set much higher up in the key range. The potential of key collision is much much less and in a distributed environment this needs to be done. In Sage CRM distribution of keys are done via a range 1000-2000 and when that range is exhausted a new range is requested. Frankly I prefer GUIDs as they are pretty much guarenteed to be unique but of course carry a size penalty.

Mark
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: (RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Sep 07 8:03 AM
Phil,

If you are inserting through the provider indeed you can use the auto-generate feature. If you are doing a distributed smart client application that is not connected to the server in a client server approach but has to synchronize data at a later time then when it is created it can be problematic. Complexity ensues you have to have tempory IDs that will need to be updated in the client when the changes are finally saved at the server. By taking an approach of ranging the ids and generating you can ensure that referencial integrity is maintained and you can query on your local client objects consistently (no special query rules need to be defined).

Here us a question with your SQL background. Is it possible with 2005 hosting the CLR to create .net extended sp that can give you back the ID from the provider (Provided it is on the same box) so that you can do the inserts within a query on the SLX box. The only way this will competely work is if no remotes are in the system.

Mark
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: (RESOLVED) Generate Table Id's W/Out slxCreateIDForYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Sep 07 7:57 PM
Thanks Mark - good points.

I've been thinking about exactly that and might give it a shot when I get a chance. Would be very useful for us all. If I do, I will post here.

Cheers
Phil
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 8:45:02 AM