freelanceprogrammers.org Forum Index » ASP

Error read Number and other


View user's profile Post To page top
email2saputra Posted: Thu Jan 12, 2006 9:37 pm


Joined: 12 Jan 2006

Posts: 4
Error read Number and other
Dear Asp,

Could brinkster free account support for page for upload file and send
email ?

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()

Best regards,
Surya A. Saputra

__________________________________________________
Apakah Anda Yahoo!?
Lelah menerima spam? Surat Yahoo! memiliki perlindungan terbaik terhadap spam
http://id.mail.yahoo.com
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

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
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help