11/22/2024 8:55:38 AM
|
|
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!
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
|
|
|
|
Randon OleDb problem when using .NET Extension
Posted: 09 Sep 10 8:52 PM
|
Using SLX version: 7.2.0.150 This only happens for remote users using MSDE 2000
I have a plugin that loads a .NET user control with data from a table. An odd things happens maybe 1 out of every 50 records, it cannot find the data in SQL, but that data does exist.
Private Sub LoadData(TicketId as string) Dim MyConn As New OleDbConnection(slxApp.ConnectionString) Dim MyCommand As New OleDbCommand("SELECT * FROM sysdba.C_TICKET_EXPENSE WHERE TICKETID = '" & TicketId & "'", MyConn)
MyConn.Open ....Execute Reader and load into textbox MyConn.Close End Sub
Its super simple, yet it does not find it. If I take that query and plug it into Server Management Studio with the TicketId, it finds it no problem. But the OleDb driver in Slx does not find it. Now here's the twist, when I exit the record or tab, a method is called to Save the data which determines whether to do an update or insert. Well because it cannot find that record, it attempts and insert, but craps out with an Slx error message about inserting duplicate rows with the same primary key.
I cannot find the cause of this problem and what makes it even more difficult to track down is that it does not happen often, only occasionally and for certain records. Anyone experience something like this before and has any advice.
Thank You |
|
|
| |
|
Re: Randon OleDb problem when using .NET Extension
Posted: 10 Sep 10 8:38 AM
|
In other words, do you by any chance have a field called "SECCODEID" on this extension table? If so, does it's value matches the one for the Parent record?
I recently took over a Customer's system that was designed with the SECCODEID on each table (even one to one tables), but with no means to keep it in sync with the Parent record, so guess what....
The moment you change ownership on the Parent record, the child records are no longer aligned, so if someone access the record with visibility only to the Parent record, they experience the same Issue (No data on the Screen, and a PK error message when Saving).
Bottom line, review your Schema, look for Custom Tables that have the SECCODEID field on it, and asses if these tables do require it (Most of the times, One to One tables shouldn't require it, but if they do, there should be a mechanism to keep them in sync as the Parent table is updated).
|
|
|
|
Re: Randon OleDb problem when using .NET Extension
Posted: 16 Sep 10 9:26 AM
|
In more modern versions of SLX, the SECCODEID field is automagically added for one to one tables....and yepper, you have to keep the SECCODEID field lockstepped with the parent record's value. |
|
|
|
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!
|
|
|
|
|
|
|
|