Results 1 to 3 of 3

Thread: Insert Data in a local Database

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2014
    Posts
    2

    Question Insert Data in a local Database

    Hi everyone, i'm a new member and i'm learning vb. I need help for a simple project. I need to build a Database (.sdf) with vb 2010 and insert/get data from it. The problem is when I insert the data with INSERT INTO queries (previously created in Data Set with Wizard), it doesn't seem to fill. Every time i click Show Data Preview in Database Explorer. it shows me a empty table.



    well... this is the code in the insertion form:
    Me.ScommessaTableAdapter.InserimentoDati(Data.Text, Mercato.Text, Partita.Text, Segno.Text, Soldi.Text, Val(Quota.Text), Motivazione.Text, Netto.Text, Sito.Text, Esito.SelectedItem)
    Me.ScommessaTableAdapter.Update(Me.BetDataDataSet)
    this is the query created:
    Name:  Cattuddsdsara.jpg
Views: 257
Size:  8.8 KB

    this is the program with 1 record:
    Name:  Cattura.jpg
Views: 248
Size:  15.1 KB
    so... this means that now the database contains a record: but...
    Name:  Cattasdasdadadaura.PNG
Views: 346
Size:  11.2 KB
    nothing
    Name:  Catddddddtura.jpg
Views: 264
Size:  8.5 KB
    and puff, if i retry with the program, the record has disappeared


    The rest of the code is useless regard to the error
    Last edited by Karapost; Oct 1st, 2014 at 01:44 PM. Reason: Adding things

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Insert Data in a local Database

    Do you get an error? If not here is a link I got from jmc that talks about the topic. http://msdn.microsoft.com/en-us/libr...89(VS.80).aspx

    It would help to see you code, we have no idea what's going on without that.

  3. #3
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Insert Data in a local Database

    Yes, please post your code so we can examine it. Also, please use [CODE] tags. Oh, and welcome to the forums!
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

Posting Permissions

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



Click Here to Expand Forum to Full Width