[RESOLVED] DataSets / DataTables & Direct Insertion
I have dealt w/ SQL as back-end many times before, but this local CE database is driving me crazy. I have a dataset (CsDbDataSet) with my table (ServiceMonitor) all set up. I have the dataset configured for CRUD and everything looks just peachy there. The problem is that I cannot write directly to the table and have it show up. I don't get any kind of error, but when I run a SELECT statement on the table, I receive no data. Am I missing something?
I am using the direct database access methods used here: http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx
Insert Method I am trying to use:
Code:
Dim ta As New CsDbDataSetTableAdapters.ServiceMonitorTableAdapter
ta.InsertRecord("Test", Now.ToString, "TestSvc", "TestSvcVer", "TestSvcStat", "TestNote", "TestProgram")
InsertRecord I am trying to use from XSD
Code:
INSERT INTO [ServiceMonitor] ([StoreID], [DateTimeStamp], [ServiceName], [ServiceVersion], [ServiceStatus], [Notes], [ProgramAndVersion]) VALUES (@StoreID, @DateTimeStamp, @ServiceName, @ServiceVersion, @ServiceStatus, @Notes, @ProgramAndVersion)
1 Attachment(s)
Re: DataSets / DataTables & Direct Insertion
This is a view of my dataset setup
Attachment 84150
Re: DataSets / DataTables & Direct Insertion
Most likely you are just looking at the wrong database. The database you access in the IDE and the one you access in your application are not the same, and for good reason. I suggest that you follow the first link in my signature to learn how local data files are managed.
Re: DataSets / DataTables & Direct Insertion
Quote:
Originally Posted by
jmcilhinney
Most likely you are just looking at the wrong database. The database you access in the IDE and the one you access in your application are not the same, and for good reason. I suggest that you follow the first link in my signature to learn how local data files are managed.
My issue was the binding source. I fixed that and it's all peachy. But the info you provided in your link was also very useful. Couldn't figure out why my DB was always blank. I made the necessary changes for my setup. Thanks again!