|
binujohnp -> RE: SQL Server 2005 Compact Edition - MS Tutorials (2/4/2009 9:53:37 PM)
|
I have created an application in VS 2008 and SQL compact 3.5. I created an .sdf file and created 3 tables. I can insert data manually, but through the program i am unable to insert data. What will the problem? Code is pasted below: bjNetworkNestConn = new SqlCeConnection("Data Source = \\Program Files\\Bidding\\NetworkNest.sdf"); objNetworkNestConn.Open(); objNetworkNestCmd = new SqlCeCommand("INSERT INTO Bid VALUES (" + bidNO + ", '" + LoginForm.BidrID + "','" + _itemID +"',"+ yourPrice+", '" + this.txtBidDate.Text + "') ",objNetworkNestConn); objNetworkNestCmd = new SqlCeCommand("INSERT INTO Bid VALUES (4,'hitl','S042',101, '2/4/2009')", objNetworkNestConn); int result = objNetworkNestCmd.ExecuteNonQuery(); The result is showing a value 1, that means it is successful. But if i query the table in server explorer, it is not showing the data. Please help me.
|
|
|
|