|
WRXSTi -> "WHERE (((Test.id)="' ??? "'');" (2/26/2002 10:13:50)
|
Below is my code. I want to capture the the id value from Querystring("id") and place it in the the WHERE condition below. It does'nt seem to be working. if I hard code a numeric value "WHERE (((Test.id)=2);" it works. If I use "WHERE (((Test.id)="' & CMD & "');" it fails? What is the correct code ? I'm witing my asp and not letting FP write any dB code. <% user = Session("UserName") 'Get Querysting info. CMD = Request.Querystring("id") Set cnn1 = Server.CreateObject("ADODB.Connection") openStr = "driver={Microsoft Access Driver (*.mdb)};" & _ "dbq=" & Server.MapPath("./fpdb/meatheads.mdb") cnn1.Open openStr,"","" sql = "SELECT Test.id, " & _ "Test.subject, " & _ "Test.condition, " & _ "Test.price, " & _ "Test.category, " & _ "Test.email, " & _ "Test.userid " & _ "FROM Test " & _ "WHERE (((Test.id)=' & CMD & ');" Set rsMbrs = Server.CreateObject("ADODB.Recordset") rsMbrs.Open sql, cnn1, adOpenForwardOnly, adLockReadOnly, adCmdText %> Me
|
|
|
|