freelanceprogrammers.org Forum Index » ASP
Error read Number
Joined: 12 Jan 2006
Posts: 4
Error read Number
Dear ASP,
is there anyone know what wrong with this code, it success when using SQL Server
but error when i
change to access, error when reading number data type
`Read n update counter
myCommand = New OleDbCommand ("select Number from Counter where Id=`1`",
myConnection )
myDataReader = myCommand.ExecuteReader()
While myDataReader.Read()
i = CInt(myDataReader.Item("Number"))
End While
myDataReader.Close()
i = i + 1
OleDb = "UPDATE Counter SET Number=`" & i & "` where Id=`1`"
myCommand = New OleDbCommand ( OleDb , myConnection )
myCommand.ExecuteNonQuery()
myConnection.Close()
lblCounter.text = cstr(i) & " times"
`View tips
Dim TutorId = (Request.QueryString("TutorId"))
myConnection = New OleDbConnection ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
Source = " & Server.MapPath ("dbWebsite.mdb") )
myConnection.Open()
OleDb = "select Subject, Body from Tutorial where TutorId=`" & TutorId & "`"
myCommand = New OleDbCommand ( OleDb, myConnection )
myDataReader = myCommand.ExecuteReader()
dlTutor.DataSource = myDataReader
dlTutor.DataBind()
__________________________________________________
Apakah Anda Yahoo!?
Lelah menerima spam? Surat Yahoo! memiliki perlindungan terbaik terhadap spam
http://id.mail.yahoo.com
[Non-text portions of this message have been removed]
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







