Hello,
I'm getting this error message:
System.MissingMemberException: Public member 'Close' on type 'OleDbCommand' not found.
And here is my db code
I checked around but found no particular help for the situation. Except I found most of the similar code also utilizing [bold]rs.Close()[/bold] as well.
I'm getting this error message:
System.MissingMemberException: Public member 'Close' on type 'OleDbCommand' not found.
And here is my db code
Code:
dim dbconn,sql,dbcomm
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & server.mappath("database/store.mdb"))
dbconn.Open()
'db command'
sql = "Insert into Preprogram_doc (" _
& "cname, caddress, ccity, cstate, czip, cphone, days, getdate" _
& ") Values (" _
& "'" & txtCName.Text & "','" & txtCAddress.Text & "','" & txtCCity.Text & "','" & ddl_states.SelectedItem.Value & "','" & txtCZip.Text & "','" & txtCPhone.Text & "','" & ddlDays.SelectedItem.Value & "','" & now() & "')"
dbcomm = New OleDbCommand(sql,dbconn)
'DataReader: OleDbDataReader class is used to read a stream of records from a data source'
dbcomm.ExecuteNonQuery()
'close DataReader and db connection'
dbcomm.Close()
dbconn.Close()
I checked around but found no particular help for the situation. Except I found most of the similar code also utilizing [bold]rs.Close()[/bold] as well.