P
Peter
Hi, there
I want to create a Stored procedure for my Access database using the code
below.
' Conn is an opened connection to my Access database
Dim cmd As OleDbCommand
cmd = Conn.CreateCommand
cmd.CommandType = CommandType.Text
cmd.CommandText = _
"CREATE PROCEDURE udpGetSampleIDByName" & vbCrLf & _
"@zSampleName VarChar(64)" & vbCrLf & _
"AS " & vbCrLf & _
"Select zSampleID FROM TSamples " & _
"Where zSampleName = @zSampleName "
cmd.ExecuteNonQuery()
After running, I got a error message: "invalid SQL Syntax£ºneeded symbol
AS¡£"
It goes well when I create SQL Server stored procedure using SQLCommand .
Now I turn to OleDB and the error occurs.
Anybody can help me?
Peter
I want to create a Stored procedure for my Access database using the code
below.
' Conn is an opened connection to my Access database
Dim cmd As OleDbCommand
cmd = Conn.CreateCommand
cmd.CommandType = CommandType.Text
cmd.CommandText = _
"CREATE PROCEDURE udpGetSampleIDByName" & vbCrLf & _
"@zSampleName VarChar(64)" & vbCrLf & _
"AS " & vbCrLf & _
"Select zSampleID FROM TSamples " & _
"Where zSampleName = @zSampleName "
cmd.ExecuteNonQuery()
After running, I got a error message: "invalid SQL Syntax£ºneeded symbol
AS¡£"
It goes well when I create SQL Server stored procedure using SQLCommand .
Now I turn to OleDB and the error occurs.
Anybody can help me?
Peter