| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Connect to sdf file with vb|
| 8:50 pm on Nov 8, 2011 (gmt 0)|
I've done a lot with regular (mdf) sql databases but never anything with sdf files. When I run this code, I get no error, but if I check the database, nothing get's inserted. Any ideas?
Dim connStr As New SqlCeConnection("Data Source=" & Application.StartupPath & "\Database1.sdf;")
'the sql syntax
Dim sql = "INSERT INTO Cowboys(CowboyLastName, CowboyFirstName, ContactInfo, Headers, Heelers) " & _
"Values('" & lastName & "', '" & firstName & "', '" & contactInfo & "', '" & header & "', '" & heeler & "')"
Dim cmd_All_Data As New SqlCeCommand(sql, connStr)
Catch ex As Exception
success = False
output.Text = ex.ToString
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved