It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming Visual Basic Forum

help me on save to sql

Moderator: dafunkymunky

help me on save to sql

Postby haskarramij on Tue Sep 16, 2008 6:29 am

i use pocket pc aplication and when i want to save the error occurred:

An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll

Additional information: The database file cannot be found. Check the path to the database. [ File name = \Application\PEOpnBEC\PEOpnBEC.sdf ]




sSQL = "INSERT INTO Area2K400 ("
sSQL = sSQL & " yes01,yes02,yes03,yes04,yes05,yes06,yes07,yes08,"
sSQL = sSQL & " text01,text02,"
sSQL = sSQL & "Remark,"
sSQL = sSQL & " Location,DoneBy,DateTime) VALUES"

sSQL = sSQL & yes01 & ", " & yes02 & ", " & yes03 & ","
sSQL = sSQL & yes04 & ", " & yes05 & ","
sSQL = sSQL & yes06 & ", " & yes07 & ", " & yes08 & ","
sSQL = sSQL & " '" & text01 & "', '" & text02 & "',"
sSQL = sSQL & "'" & FixSQL(Remark) & "',"
sSQL = sSQL & " '" & Location & "',"
sSQL = sSQL & " '" & DoneBy & "',"
sSQL = sSQL & " '" & Format(DateTime, "yyyy/MM/dd hh:mm:ss tt") & "')"


myConn.Open()
myCommand = New SqlCeCommand
myCommand = myConn.CreateCommand()
myCommand.CommandText = sSQL
myCommand.ExecuteNonQuery()

Could you please help me with these codings as soon as possible.Please~.coz my dateline for this project is due on this coming thursday
=)
haskarramij
 
Posts: 0
Joined: Tue Sep 16, 2008 5:47 am
Location: malaysia

Who is online

Users browsing this forum: No registered users and 0 guests