BC30203: Identifier expected.

Joined
Jan 29, 2008
Messages
2
Reaction score
0
Hi a newbie to ASP.net but have got the majority of my code working (fingers crossed) I'm currently working on update pages when this error comes up.

Any Ideas?

Line 384: dbParam_Notes.ParameterName = "?Notes"
Line 385: dbParam_Notes.Value = structCA_Medication.Notes
Line 386: dbParam_Notes.DbType = MySqlDbType.String
Line 387: dbCommand.Parameters.Add(dbParam_Notes)
Line 388:


Source File: C:\inetpub\wwwroot\HealthActionPlan\frmcurrentmed.aspx Line: 386


Private Sub DBInsertBaseMedication(ByRef structCA_Medication As CA_Medication)

Dim strErrMsg As String = ""
Dim myTrans As MySqlTransaction
Dim myConnection As MySqlConnection

myConnection = New MySqlConnection(mstrConnectionString)
Dim dbCommand As MySqlCommand = myConnection.CreateCommand()

Dim dbParam_Notes As System.Data.IDataParameter = New MySqlParameter
dbParam_Notes.ParameterName = "?Notes"
dbParam_Notes.Value = structCA_Medication.Notes
dbParam_Notes.DbType = MySqlDbType.String
dbCommand.Parameters.Add(dbParam_Notes)


myConnection.Open()
dbCommand.Connection = myConnection


myTrans = myConnection.BeginTransaction()

dbCommand.Transaction = myTrans

Dim blnAddnew As Boolean = False

blnAddnew = True

Dim strSQL As String = _
"INSERT INTO currentmedication ( " & _
"Notes, " & _) " & _
"VALUES ( " & _
"?Notes, " & _); "

dbCommand.CommandText = strSQL & "SELECT LAST_INSERT_ID()"
dbCommand.ExecuteNonQuery()


myTrans.Commit()

dbCommand.Connection.Close()
myConnection.Dispose()

myConnection.Close()
End Sub



Thanks in advance

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,115
Messages
2,570,698
Members
47,273
Latest member
mikkamuertio

Latest Threads

Top