Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 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!
 Architect Forums - SalesLogix .NET Extensions
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix .NET Extensions | New ThreadView:  Search:  
 Author  Thread: Randon OleDb problem when using .NET Extension
Vince P.
Posts: 1
 
Randon OleDb problem when using .NET ExtensionYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: Randon OleDb problem when using .NET ExtensionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Sep 10 12:25 AM
Just because the record is in the database does not mean that the user has rights. Is there record level security that is hiding that record from your read?
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Randon OleDb problem when using .NET ExtensionYour last visit to this thread was on 1/1/1970 12:00:00 AM
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).


[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Randon OleDb problem when using .NET ExtensionYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[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/22/2024 9:49:13 AM