problem in retrieving data

Results 1 to 2 of 2

Thread: problem in retrieving data

  1. #1
    Join Date
    Dec 1969

    Default problem in retrieving data

    umm...guys, im having a prob in accessing my db<BR>i got a table named contact. i want to display the data inside that table.<BR>i would also like to add some data from the webpage to the db.<BR>how can i do that?<BR><BR>here is my code:(in accessing the db)<BR>&#060;%<BR>id = request.querystring("id")<BR>allSQL = "SELECT * FROM contacts where contact_id=&#039;"&id&"&#039; "<BR><BR>set allRS =Server.CreateObject("ADODB.Recordset")<BR>allRS = oConn.Execute(allSQL)<BR>allRS.Open "select * from contact", contact18<BR>%&#062;<BR><BR>but i always have this kind of error:<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e07&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. <BR><BR>/contact_reply.asp, line 189 <BR><BR>can anybody please help me. im kinda new in this field<BR>thanks<BR>dinha<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: problem in retrieving data

    Dear Dinha!<BR>What is the exact table name ?? &#039;Contact&#039; or &#039;Contacts&#039; anyhow what ever the table name is try the following query.<BR><BR>ID= Request.Form("id")<BR>allSQL = "Select * from contact Where contact_id = " & ID <BR><BR>I guess that in the table the ID is an integer type column and in query u r treating as string thats y it generate a type mismatch error.<BR>I guess it will work. <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts