|
 |
asp_databases thread: GetString from an Oracle Database
Message #1 by "Jason Lenardson" <jlenardson@h...> on Fri, 20 Jul 2001 15:02:35
|
|
Can anyone help me?? I am trying to use getString to retrive data from an
oracle database. GetRows() works fine, but GetString() gives me the oh so
helpful "syntax error";
function GetData()
{
// Setup the Search statements to pass to the DB
strSearchStatement = "select * from qs_product_families";
// Setup the connection to the DB to execute a procedure
var connDb = Server.CreateObject("ADODB.Connection"),
connStr = Session("connStrSimpleSql");
connDb.Open(connStr);
objRecordSet = Server.CreateObject("ADODB.Recordset");
objRecordSet.Open(strSearchStatement,connDb);
if (!(objRecordSet.BOF) && !(objRecordSet.EOF)) {
//stringTest = "Testing";
var stringTest = objRecordSet.GetString(adClipString,,"~","~~","Null");
objRecordSet.Close();
objRecordSet = null;
connDb.Close();
connDb = null;
}
return stringTest;
}
Message #2 by "Tomm Matthis" <matthis@b...> on Fri, 20 Jul 2001 10:07:04 -0400
|
|
Do you have the ado constants referenced anywhere? (For AdClipString
that is.)
Try substituting 2 for adClipString, if that works, then the missing
constant ref would be the problem.
-- Tomm
> -----Original Message-----
> From: Jason Lenardson [mailto:jlenardson@h...]
> Sent: Friday, July 20, 2001 3:03 PM
> To: ASP Databases
> Subject: [asp_databases] GetString from an Oracle Database
>
>
> Can anyone help me?? I am trying to use getString to retrive
> data from an
> oracle database. GetRows() works fine, but GetString() gives me
> the oh so
> helpful "syntax error";
>
> function GetData()
> {
> // Setup the Search statements to pass to the DB
> strSearchStatement =3D "select * from qs_product_families";
>
> // Setup the connection to the DB to execute a procedure =09
> var connDb =3D Server.CreateObject("ADODB.Connection"),
> connStr =3D Session("connStrSimpleSql");
> connDb.Open(connStr);
> objRecordSet =3D Server.CreateObject("ADODB.Recordset");
> objRecordSet.Open(strSearchStatement,connDb);
>
> if (!(objRecordSet.BOF) && !(objRecordSet.EOF)) {
> //stringTest =3D "Testing";
> var stringTest =3D
> objRecordSet.GetString(adClipString,,"~","~~","Null");
> objRecordSet.Close();
> objRecordSet =3D null;
> connDb.Close();
> connDb =3D null;
> }
> return stringTest;
> }
Message #3 by "Jason Lenardson" <jlenardson@h...> on Fri, 20 Jul 2001 16:39:34
|
|
I do have the ado constants available, but I tried your suggestion anyway -
it still didn't work.
Has anyone out there ever gotten this to work with Oracle?
-jason
> Do you have the ado constants referenced anywhere? (For AdClipString
> that is.)
> Try substituting 2 for adClipString, if that works, then the missing
> constant ref would be the problem.
>
> -- Tomm
>
> > -----Original Message-----
> > From: Jason Lenardson [mailto:jlenardson@h...]
> > Sent: Friday, July 20, 2001 3:03 PM
> > To: ASP Databases
> > Subject: [asp_databases] GetString from an Oracle Database
> >
> >
> > Can anyone help me?? I am trying to use getString to retrive
> > data from an
> > oracle database. GetRows() works fine, but GetString() gives me
> > the oh so
> > helpful "syntax error";
> >
> > function GetData()
> > {
> > // Setup the Search statements to pass to the DB
> > strSearchStatement =3D "select * from qs_product_families";
> >
> > // Setup the connection to the DB to execute a procedure =09
> > var connDb =3D Server.CreateObject("ADODB.Connection"),
> > connStr =3D Session("connStrSimpleSql");
> > connDb.Open(connStr);
> > objRecordSet =3D Server.CreateObject("ADODB.Recordset");
> > objRecordSet.Open(strSearchStatement,connDb);
> >
> > if (!(objRecordSet.BOF) && !(objRecordSet.EOF)) {
> > //stringTest =3D "Testing";
> > var stringTest =3D
> > objRecordSet.GetString(adClipString,,"~","~~","Null");
> > objRecordSet.Close();
> > objRecordSet =3D null;
> > connDb.Close();
> > connDb =3D null;
> > }
> > return stringTest;
> > }
|
|
 |