Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, April 30, 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!
 Administration Forums - Database Administration
Forum to discuss SQL Server or Oracle database administration related to SalesLogix databases. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Database Administration | New ThreadView:  Search:  
 Author  Thread: one-to many with no id fields
Michael Litman
Posts: 94
 
one-to many with no id fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Nov 06 4:43 PM
fiogf49gjkf0d
Hi all,

I have a custom table (created before my hire) that db manager lists as one to many but it doesn't have a unique ID field. I have tried to duplicate this but when I create a one to many it creates a unique ID field and the parent ID field.

My question is what is impact of this ID field being missing.

Thanks for the help ML
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: one-to many with no id fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Nov 06 9:09 AM
fiogf49gjkf0d
Just some comments:

1- It is obvious that this table was in some form or shape manipulated outside of Saleslogix. So, it may not sync (or it may not synch properly).

2- I don't think it has any Impact on the DB, other than the fact that if you needed to update a given row you wouldn't have a unique ID field to identify it so you would have a bit more complexity updating individual rows.

3- If you were to put this data onto a Datagrid, you wouldn't be able to specify a Keyfield, which probably would result in a Read Only datagrid.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: one-to many with no id fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Nov 06 9:12 AM
fiogf49gjkf0d
Sounds fishy. If it is missing the primary ID field I'd question if it was really built using standard SLX methods (ie: created in DB manager). How is it not blowing up SLX without a specified primary key?

If you check that table in the RESYNCTABLEDEFS table, does it list a PRMARYKEY?

Run this query in Query Analyzer (of course change MYTABLENAME to the table in question):

select * from resynctabledefs where tablename = 'MYTABLENAME' 


Does it list a KEYFIELD? Compare that entry to some other one-to-many table in RESYNCTABLEDEFS, are there any glaring differences?
[Reply][Quote]
Michael Litman
Posts: 94
 
Re: one-to many with no id fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Nov 06 9:48 AM
fiogf49gjkf0d
the keyfield is the parent table ID field (Contactid). It almost seems that the creator wanted a one to one but set it up as a one to many and then went into the SQL server backend and deleted the unique keyfield leaving a one to one even though SLX list it as a one to many. what effect is this going to have on the data that is in the table?

Also it is causing SLX to send data being entered in to cyberspace never to be seen again. Thansk ML
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: one-to many with no id fieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Nov 06 10:32 AM
fiogf49gjkf0d
Bottom line: is this supposed to be a 1 to 1 or 1 to many?
Regardless of the answer, its probably better to correct the situation rather than wondering what the issues might be.

I suggest you take the following approach:
- Copy the data to a Temp table.
- Drop the table
- Create a new table with the Appropriate settings and fields
- Bring the data back into the new table (you may have to script it if in the end it is a one to Many so that you could get IDs for the Many table).
- Review Existing Code and Views that utilize this table and make the necessary adjustments.

[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): 4/30/2024 6:52:55 PM