logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > ASP
Register FAQ Members List Search Today's Posts Mark Forums Read

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 07-16-2008, 04:01 AM   #1
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default mysql and record setting

Hi there,

I am trying to define my page to get a value from the URL in asp. I have doen the following to connect and define my record set to get the table that all the information is in and display it in order. The following is the code
Code:
<%
Dim rsProdDetail__varProduct
rsProdDetail__varProduct = "Request.QueryString("productID")"
If (BVAL <> "") Then 
  rsProdDetail__varProduct = BVAL
End If
%>
<%
Dim rsProdDetail
Dim rsProdDetail_cmd
Dim rsProdDetail_numRows

Set rsProdDetail_cmd = Server.CreateObject ("ADODB.Command")
rsProdDetail_cmd.ActiveConnection = MM_DMICSQL_STRING
rsProdDetail_cmd.CommandText = "SELECT SER_ID_Name, SER_ID, Header, SubHeader, Disclaimer, Section, Pic_UNC, Paragraph, Bullets FROM dbo.F01_Products_Detail, dbo.F01_Products WHERE dbo.F01_Products_Detail.SER_ID=dbo.F01_Products.SER_ID_Name AND dbo.F01_Products_Detail.SER_ID=?" 
rsProdDetail_cmd.Prepared = true
rsProdDetail_cmd.Parameters.Append rsProdDetail_cmd.CreateParameter("param1", 200, 1, 255, rsProdDetail__varProduct) ' adVarChar

Set rsProdDetail = rsProdDetail_cmd.Execute
rsProdDetail_numRows = 0
%>
It's suppose to get the value that is passed through the URL and sort the record set according to that. When I did the code in mysql and executed it it was fine all I did was replace '.SER_ID=?' with a value that its suppose to get from the URL. Am I doing something newbish wrong? The error that is coming up says that
Code:
rsProdDetail__varProduct = "Request.QueryString("productID")"
is expecting end statement but there is an end if statement as you can see. Any help is welcomed!

Thanks for your help!
-Xavier
rico1931 is offline   Reply With Quote
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:46 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com