dcsimg
Results 1 to 4 of 4

Thread: [RESOLVED] DataSets / DataTables & Direct Insertion

  1. #1

    Thread Starter
    Hyperactive Member mbutler755's Avatar
    Join Date
    May 2008
    Location
    Peoria, AZ
    Posts
    417

    Resolved [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)
    Regards,

    Matt Butler, MBA, BSIT/SE, MCBP
    Owner, Intense IT, LLC
    Find us on Facebook
    Follow us on Twitter
    Link up on LinkedIn
    mb (at) i2t.us

    CODE BANK SUBMISSIONS: Converting Images to Base64 and Back Again

  2. #2

    Thread Starter
    Hyperactive Member mbutler755's Avatar
    Join Date
    May 2008
    Location
    Peoria, AZ
    Posts
    417

    Re: DataSets / DataTables & Direct Insertion

    This is a view of my dataset setup

    Name:  DataSet.jpg
Views: 78
Size:  131.7 KB
    Regards,

    Matt Butler, MBA, BSIT/SE, MCBP
    Owner, Intense IT, LLC
    Find us on Facebook
    Follow us on Twitter
    Link up on LinkedIn
    mb (at) i2t.us

    CODE BANK SUBMISSIONS: Converting Images to Base64 and Back Again

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,389

    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.

  4. #4

    Thread Starter
    Hyperactive Member mbutler755's Avatar
    Join Date
    May 2008
    Location
    Peoria, AZ
    Posts
    417

    Re: DataSets / DataTables & Direct Insertion

    Quote Originally Posted by jmcilhinney View Post
    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!
    Regards,

    Matt Butler, MBA, BSIT/SE, MCBP
    Owner, Intense IT, LLC
    Find us on Facebook
    Follow us on Twitter
    Link up on LinkedIn
    mb (at) i2t.us

    CODE BANK SUBMISSIONS: Converting Images to Base64 and Back Again

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width