Using VBscript to read from an SQL database
I have an SQL database set up in which I would like to use a vbscript to read from it.

Here is the code I am trying to use.

        SQL_Command_String = "SELECT * FROM Table1 JOIN Table2 WHERE Table1.ID = '5' AND Table2.Date LIKE '2011'"

    Set Rs = SQLConnection.Execute(SQL_Command_String)
     DO WHILE NOT Rs.EOF
    file1="./seminars/"&seminar_type&"/"&seminar_year&"/"&Rs("date")&"-"&Rs("year")&"_"&Rs("last")&".pdf"

seminar_year and seminar_type are constants I have initialized and declared to be seminar_year = 2011 and seminar_type = section1.

I believe I have the SQL_Command_String messed up with the LIKE statement. I'm not sure if it is being used properly. I just want it to find cells that include 2011 in the date but i'm not sure if I should include wildcards for the month and day portions of the date and if so what wildcards?

When I comment out the declaration (Set) of Rs the page loads fine (except that it hasn't filled out the table). The error that is displayed when included is 
"An error occurred on the server when processing the URL. Please contact the system administrator. 
If you are the system administrator please click here to find out more about this error.
" 

The here simply takes you to a microsoft page about running os IIS 7 which I have already accounted for.
 
I'm really stumped on this one my thoughts are I have the SQL command incorrect, there is a confliction with the new framework that is out, or I am not declaring the reader correctly or perhaps i'm not using the correct type of reader.

I would appreciate any insights the SO community has. Thanks and please know I am very new at VBscripts
Using VBscript to read from an SQL database
===

I have an SQL database set up in which I would like to use a vbscript to read from it.

Here is the code I am trying to use.

        SQL_Command_String = "SELECT * FROM Table1 JOIN Table2 WHERE Table1.ID = '5' AND Table2.Date LIKE '2011'"

    Set Rs = SQLConnection.Execute(SQL_Command_String)
     DO WHILE NOT Rs.EOF
    file1="./seminars/"&seminar_type&"/"&seminar_year&"/"&Rs("date")&"-"&Rs("year")&"_"&Rs("last")&".pdf"

seminar_year and seminar_type are constants I have initialized and declared to be seminar_year = 2011 and seminar_type = section1.

I believe I have the SQL_Command_String messed up with the LIKE statement. I'm not sure if it is being used properly. I just want it to find cells that include 2011 in the date but i'm not sure if I should include wildcards for the month and day portions of the date and if so what wildcards?

When I comment out the declaration (Set) of Rs the page loads fine (except that it hasn't filled out the table). The error that is displayed when included is 
"An error occurred on the server when processing the URL. Please contact the system administrator. 
If you are the system administrator please click here to find out more about this error.
" 

The here simply takes you to a microsoft page about running os IIS 7 which I have already accounted for.
 
I'm really stumped on this one my thoughts are I have the SQL command incorrect, there is a confliction with the new framework that is out, or I am not declaring the reader correctly or perhaps i'm not using the correct type of reader.

I would appreciate any insights the SO community has. Thanks and please know I am very new at VBscripts