SQL error - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

SQL error

Microsoft OLE DB Provider for SQL Server error '80040e21'
The requested properties cannot be supported.

here's the code:

if(String(Request.QueryString("thePerson")) != 0 ) {
sscPeriod__MMColParam3 = String(Request.QueryString("thePerson"));
} else { sscPeriod__MMColParam3 = "'%'"; }

if(String(Request.QueryString("theEditor")) != 0 ) {
sscPeriod__MMColParam5 = String(Request.QueryString("theEditor"));
} else { sscPeriod__MMColParam5 = "'%'"; }

var sscPeriod = Server.CreateObject("ADODB.Recordset");
sscPeriod.ActiveConnection = MM_connSsc_STRING;
sscPeriod.Source = "SELECT * FROM dbo.sscHome_V WHERE sscPeriod_IN LIKE "+ sscPeriod__MMColParam
+ " AND sscSectYear_IN LIKE "+ sscPeriod__MMColParam2
+ " AND sscPrntPerson_VC LIKE "+ sscPeriod__MMColParam3
+ " AND sscCode_IN LIKE "+ sscPeriod__MMColParam4
+ " AND sscEditor_VC LIKE "+ sscPeriod__MMColParam5;
sscPeriod.CursorType = 0;
sscPeriod.CursorLocation = 2;
sscPeriod.LockType = 3;
sscPeriod.Open();

well...theres alittle more code..but the 2 IF statements i left are always going to be strings passed via URL. they work if its a zero (wildcard), but not if its a text string. any suggestions on a fix?

<3 steve.

Comments

  • stevetomorrowstevetomorrow Posts: 58Member
    yeah...had to pass single quotes in the URL.

    : Microsoft OLE DB Provider for SQL Server error '80040e21'
    : The requested properties cannot be supported.
    :
    : here's the code:
    :
    : if(String(Request.QueryString("thePerson")) != 0 ) {
    : sscPeriod__MMColParam3 = String(Request.QueryString("thePerson"));
    : } else { sscPeriod__MMColParam3 = "'%'"; }
    :
    : if(String(Request.QueryString("theEditor")) != 0 ) {
    : sscPeriod__MMColParam5 = String(Request.QueryString("theEditor"));
    : } else { sscPeriod__MMColParam5 = "'%'"; }
    :
    : var sscPeriod = Server.CreateObject("ADODB.Recordset");
    : sscPeriod.ActiveConnection = MM_connSsc_STRING;
    : sscPeriod.Source = "SELECT * FROM dbo.sscHome_V WHERE sscPeriod_IN LIKE "+ sscPeriod__MMColParam
    : + " AND sscSectYear_IN LIKE "+ sscPeriod__MMColParam2
    : + " AND sscPrntPerson_VC LIKE "+ sscPeriod__MMColParam3
    : + " AND sscCode_IN LIKE "+ sscPeriod__MMColParam4
    : + " AND sscEditor_VC LIKE "+ sscPeriod__MMColParam5;
    : sscPeriod.CursorType = 0;
    : sscPeriod.CursorLocation = 2;
    : sscPeriod.LockType = 3;
    : sscPeriod.Open();
    :
    : well...theres alittle more code..but the 2 IF statements i left are always going to be strings passed via URL. they work if its a zero (wildcard), but not if its a text string. any suggestions on a fix?
    :
    : <3 steve.
    :


    <3 steve.

Sign In or Register to comment.