Author |
Topic |
|
enidesigns
Starting Member
15 Posts |
Posted - 01 May 2002 : 17:24:01
|
The situation - I am writing a small streaming media service based on my own compositions. From the main album listing, a hard coded GUID is sent to the listen page when a user clicks on a songs link (example: listen.asp?id=48B33616-3AA1-4896-9B74-9A829F6F854C). Simple enough.
On listen.asp, it's obviously easy to retrieve the id by using the request.querystring function. Using the id, I query the database to look for it's match in the main track listing, from which I pull the track's information from the record. (This information includes song length, notes and urls that will be used to stream the audio (selectable bandwidth)).
Here is where the code has problems...
dim objConnection set objConnection = server.CreateObject("adodb.connection") objConnection.Open strConnString
dim ret ret=request.querystring("id")
SQL="SELECT * FROM TBL_TRACK_MASTER" SQL=SQL & "WHERE (((TBL_TRACK_MASTER.M_GUID)="" & RET & ""));"
Dim rspod Set rspod=Server.CreateObject(ADODB.Recordset") rspod.Open sql, strConnString, 3, ,adCmdText
Any calls I make to rspod after this point results in this: (example of one call: response.write "Title = " & rspod("M_TITLE")
error '80020009' Exception occurred.
/Forum/listen.asp, line xx
More confusing (to me), is the fact that if I hard code the GUID into the query string, like so...
SQL="SELECT * FROM TBL_TRACK_MASTER" SQL=SQL & "WHERE (((TBL_TRACK_MASTER.M_GUID)=""48B33616-3AA1-4896-9B74-9A829F6F854C""));"
...then there are absolutely NO problems. So, it's obvious that I have something wrong with my SQL query string. But where? I've spend hours and hours and sigh..hours trying variations but no luck, so now Im begging for someone to help me.
Thanks for reading my story :) Enidesigns
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 01 May 2002 : 17:40:54
|
Try it like this:
SQL="SELECT * FROM TBL_TRACK_MASTER" SQL=SQL & "WHERE (((TBL_TRACK_MASTER.M_GUID)=""" & RET & """));"
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
enidesigns
Starting Member
15 Posts |
Posted - 01 May 2002 : 17:48:57
|
LoL!
You know, I WAS going to reply and say "thanks, but I already did that...", but I figured I'd give it one more shot...and bygosh, it worked!
Thanks, ruirib for your VERY quick response! You da man! (Now I just feel kinda stupid for the number of hours i've attempted to fix it myself...)
Regards, Mark Enidesigns
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 01 May 2002 : 17:54:36
|
Glad it worked . That's a pretty common mistake, so no reason to chastise yourself .
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
|
Topic |
|
|
|