Dov_B
asked on
Changes I am making to my database during runtime are not permanent
I am using vb.net 2008 express sqlce
when I first started using sql to add and delete records to my database file during runtime the changes remained permenat and I could see them in the database explorer
Now when I delete records when I rerun the program they reappear and when I add records they dont last after I shutdown the application
I did make certain change so that the database would install with my application on other machines
what do I do so that changes will be permanent
when I first started using sql to add and delete records to my database file during runtime the changes remained permenat and I could see them in the database explorer
Now when I delete records when I rerun the program they reappear and when I add records they dont last after I shutdown the application
I did make certain change so that the database would install with my application on other machines
what do I do so that changes will be permanent
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can u please upload any sample project so i can look in to it..
ASKER
Sub myCommnd(ByVal mSql As String)
Dim constring = "Data Source=" & Application.StartupPath & "\Database1.sdf;Persist Security Info=False;"
Dim myCon As New SqlCeConnection(constring)
Dim f As New SqlCeCommand(mSql, myCon)
myCon.Open()
' Create and fill dataset
f.ExecuteNonQuery()
myCon.Close()
ASKER
this is a view of mydatbases's properties
database.bmp
database.bmp
ASKER
oops I left out the sql for the command
dim mSql="insert into table values('a')"
Dim f As New SqlCeCommand(mSql, myCon)
myCon.Open()
f.ExecuteNonQuery()
myCon.Close()
dim mSql="insert into table values('a')"
Dim f As New SqlCeCommand(mSql, myCon)
myCon.Open()
f.ExecuteNonQuery()
myCon.Close()
ur problem solved now?
ASKER
no
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER