MySQL Database Connections

MySQL Database Connections

am 29.07.2006 05:07:49 von James Jones

This is a multi-part message in MIME format.

------=_NextPart_000_00CC_01C6B292.43CC2720
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I was wondering if i can create 2 server objects for my MySQL database. =
here is my code:



<%
catID =3D Request.QueryString("catID")
SQL_Get_Products =3D "Select catID, prodID, prod_price, =
prod_title, prod_img_url FROM products WHERE catID =3D '" & catID & "'"
rs.Open SQL_Get_Products , conn
SQL_Get_Categories =3D "Select * FROM categories WHERE =
parent_cat =3D '" & catID & "'"
rs2.Open SQL_Get_Categories , conn
%>



Connection.asp:



<%
server2 =3D "XXXXXXXXX"
database =3D "XXXXXXXXXXX"
username =3D "XXXXXXXXXXXX"
password =3D "XXXXXXXXXXXX"
sConnection =3D "DRIVER=3D{MySQL ODBC 3.51 Driver}; SERVER=3D" & server2 =
& "; DATABASE=3D" & database & "; UID=3D" & username & ";PASSWORD=3D" & =
password & "; OPTION=3D3"
Set Conn =3D Server.CreateObject("ADODB.Connection")
Conn.Open(sConnection)
set rs =3D Server.CreateObject("ADODB.recordset")
set rs2 =3D Server.CreateObject("ADODB.recordset")
%>







My error is:


Microsoft VBScript runtime error '800a01a8'=20

Object required: ''=20

/shoppingcart/index.asp, line 74=20











can anyone help me? PLEASE!!! i need to get one field out of one table, =
and all the rest out of the other.......





Thanks,

James

------=_NextPart_000_00CC_01C6B292.43CC2720
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



charset=3Diso-8859-1">




I was wondering if i can create 2 =
server objects=20
for my MySQL database. here is my code:

 

 

size=3D2>          &nbs=
p;=20
<!--#INCLUDE=20
FILE=3D"connection.asp"-->
      &nbs=
p;    =20
<%
          &nbs=
p;=20
catID =
Request.QueryString("catID")
       =
;    =20
SQL_Get_Products =3D "Select catID, prodID, prod_price, prod_title, =
prod_img_url=20
FROM products WHERE catID =3D '" & catID &=20
"'"
           =
=20
rs.Open SQL_Get_Products ,=20
conn
           =
;=20
SQL_Get_Categories =3D "Select * FROM categories WHERE parent_cat =3D '" =
& catID=20
& =
"'"
           =
=20
rs2.Open SQL_Get_Categories ,=20
conn
           =
;=20
%>

 

 

 

Connection.asp:

 

 

 

<%
server2 =3D =
"XXXXXXXXX"
database =
"XXXXXXXXXXX"
username =3D "XXXXXXXXXXXX"
password =
"XXXXXXXXXXXX"
sConnection =3D "DRIVER=3D{MySQL ODBC 3.51 Driver}; =
SERVER=3D" &=20
server2 & "; DATABASE=3D" & database & "; UID=3D" & =
username &=20
";PASSWORD=3D" & password & "; OPTION=3D3"
Set Conn =
Server.CreateObject("ADODB.Connection")
Conn.Open(sConnection)
set =
rs =
Server.CreateObject("ADODB.recordset")
set rs2 =
Server.CreateObject("ADODB.recordset")
%>

 

 

 

 

 

 

My error is:

 

 


Microsoft VBScript runtime error=20
'800a01a8'

Object required: ''=20

/shoppingcart/index.asp face=3DArial=20
size=3D2>, line 74


 


 


 


 


 


can anyone help me? PLEASE!!! i need to get one field out of one =
table, and=20
all the rest out of the other.......


 


 


Thanks,


James



------=_NextPart_000_00CC_01C6B292.43CC2720--

Re: MySQL Database Connections

am 29.07.2006 05:45:00 von James Jones

This is a multi-part message in MIME format.

------=_NextPart_000_012F_01C6B297.759AE890
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

also i tried this:



<%
catID =3D Request.QueryString("catID")
SQL_Get_Products =3D "SELECT products.catID, =
products.prodID, products.prod_price, products.prod_title, =
products.prod_img_url, categories.catID FROM products, categories WHERE =
products.catID =3D '" & catID & "'"
rs.Open SQL_Get_Products , conn
%>


all records are displayed 2 times each....not sure whyl.
"James Jones" wrote in message =
news:eIVpvwrsGHA.1632@TK2MSFTNGP06.phx.gbl...
I was wondering if i can create 2 server objects for my MySQL =
database. here is my code:



<%
catID =3D Request.QueryString("catID")
SQL_Get_Products =3D "Select catID, prodID, prod_price, =
prod_title, prod_img_url FROM products WHERE catID =3D '" & catID & "'"
rs.Open SQL_Get_Products , conn
SQL_Get_Categories =3D "Select * FROM categories WHERE =
parent_cat =3D '" & catID & "'"
rs2.Open SQL_Get_Categories , conn
%>



Connection.asp:



<%
server2 =3D "XXXXXXXXX"
database =3D "XXXXXXXXXXX"
username =3D "XXXXXXXXXXXX"
password =3D "XXXXXXXXXXXX"
sConnection =3D "DRIVER=3D{MySQL ODBC 3.51 Driver}; SERVER=3D" & =
server2 & "; DATABASE=3D" & database & "; UID=3D" & username & =
";PASSWORD=3D" & password & "; OPTION=3D3"
Set Conn =3D Server.CreateObject("ADODB.Connection")
Conn.Open(sConnection)
set rs =3D Server.CreateObject("ADODB.recordset")
set rs2 =3D Server.CreateObject("ADODB.recordset")
%>







My error is:


Microsoft VBScript runtime error '800a01a8'=20

Object required: ''=20

/shoppingcart/index.asp, line 74=20











can anyone help me? PLEASE!!! i need to get one field out of one =
table, and all the rest out of the other.......





Thanks,

James

------=_NextPart_000_012F_01C6B297.759AE890
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



charset=3Diso-8859-1">




also i tried this:

 

 

 

size=3D2>          &nbs=
p;=20
<%
          &nbs=
p;=20
catID =
Request.QueryString("catID")
       =
;    =20
SQL_Get_Products =3D "SELECT products.catID, products.prodID, =
products.prod_price,=20
products.prod_title, products.prod_img_url, categories.catID FROM =
products,=20
categories WHERE products.catID =3D '" & catID &=20
"'"
           =
=20
rs.Open SQL_Get_Products ,=20
conn
           =
;=20
%>

 

 

all records are displayed 2 times =
each....not sure=20
whyl.

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"James Jones" < =
href=3D"mailto:jamisonburrous08@insightbb.com">jamisonburrou s08@insightbb=
..com>=20
wrote in message =
href=3D"news:eIVpvwrsGHA.1632@TK2MSFTNGP06.phx.gbl">news:eIV pvwrsGHA.1632=
@TK2MSFTNGP06.phx.gbl...

I was wondering if i can create 2 =
server objects=20
for my MySQL database. here is my code:

 

 

=
size=3D2>          &nbs=
p;=20
<!--#INCLUDE=20
=
FILE=3D"connection.asp"-->
      &nbs=
p;    =20
=
<%
          &nbs=
p;=20
catID =
=
Request.QueryString("catID")
       =
;    =20
SQL_Get_Products =3D "Select catID, prodID, prod_price, prod_title, =
prod_img_url=20
FROM products WHERE catID =3D '" & catID &=20
=
"'"
           =
=20
rs.Open SQL_Get_Products ,=20
=
conn
           =
;=20
SQL_Get_Categories =3D "Select * FROM categories WHERE parent_cat =3D =
'" &=20
catID &=20
=
"'"
           =
=20
rs2.Open SQL_Get_Categories ,=20
=
conn
           =
;=20
%>

 

 

 

Connection.asp:

 

 

 

<%
server2 =3D =
"XXXXXXXXX"
database =
"XXXXXXXXXXX"
username =3D "XXXXXXXXXXXX"
password =
"XXXXXXXXXXXX"
sConnection =3D "DRIVER=3D{MySQL ODBC 3.51 Driver}; =
SERVER=3D"=20
& server2 & "; DATABASE=3D" & database & "; UID=3D" =
& username=20
& ";PASSWORD=3D" & password & "; OPTION=3D3"
Set Conn =
=
=
Server.CreateObject("ADODB.Connection")
Conn.Open(sConnection)
set =
rs =
Server.CreateObject("ADODB.recordset")
set rs2 =
Server.CreateObject("ADODB.recordset")
%>

 

 

 

 

 

 

My error is:

 

 


Microsoft VBScript runtime error=20
'800a01a8'

Object required: ''=20

/shoppingcart/index.asp face=3DArial=20
size=3D2>, line 74


 


 


 


 


 


can anyone help me? PLEASE!!! i need to get one field out of one =
table, and=20
all the rest out of the other.......


 


 


Thanks,


James



------=_NextPart_000_012F_01C6B297.759AE890--

Re: MySQL Database Connections

am 29.07.2006 07:26:50 von James Jones

This is a multi-part message in MIME format.

------=_NextPart_000_021F_01C6B2A5.AEF704D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

nvm.......i finally got it workin rite..............
"James Jones" wrote in message =
news:edoYhFssGHA.4324@TK2MSFTNGP05.phx.gbl...
also i tried this:



<%
catID =3D Request.QueryString("catID")
SQL_Get_Products =3D "SELECT products.catID, =
products.prodID, products.prod_price, products.prod_title, =
products.prod_img_url, categories.catID FROM products, categories WHERE =
products.catID =3D '" & catID & "'"
rs.Open SQL_Get_Products , conn
%>


all records are displayed 2 times each....not sure whyl.
"James Jones" wrote in message =
news:eIVpvwrsGHA.1632@TK2MSFTNGP06.phx.gbl...
I was wondering if i can create 2 server objects for my MySQL =
database. here is my code:



<%
catID =3D Request.QueryString("catID")
SQL_Get_Products =3D "Select catID, prodID, prod_price, =
prod_title, prod_img_url FROM products WHERE catID =3D '" & catID & "'"
rs.Open SQL_Get_Products , conn
SQL_Get_Categories =3D "Select * FROM categories WHERE =
parent_cat =3D '" & catID & "'"
rs2.Open SQL_Get_Categories , conn
%>



Connection.asp:



<%
server2 =3D "XXXXXXXXX"
database =3D "XXXXXXXXXXX"
username =3D "XXXXXXXXXXXX"
password =3D "XXXXXXXXXXXX"
sConnection =3D "DRIVER=3D{MySQL ODBC 3.51 Driver}; SERVER=3D" & =
server2 & "; DATABASE=3D" & database & "; UID=3D" & username & =
";PASSWORD=3D" & password & "; OPTION=3D3"
Set Conn =3D Server.CreateObject("ADODB.Connection")
Conn.Open(sConnection)
set rs =3D Server.CreateObject("ADODB.recordset")
set rs2 =3D Server.CreateObject("ADODB.recordset")
%>







My error is:


Microsoft VBScript runtime error '800a01a8'=20

Object required: ''=20

/shoppingcart/index.asp, line 74=20











can anyone help me? PLEASE!!! i need to get one field out of one =
table, and all the rest out of the other.......





Thanks,

James

------=_NextPart_000_021F_01C6B2A5.AEF704D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



charset=3Diso-8859-1">




nvm.......i finally got it workin=20
rite..............

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"James Jones" < =
href=3D"mailto:jamisonburrous08@insightbb.com">jamisonburrou s08@insightbb=
..com>=20
wrote in message =
href=3D"news:edoYhFssGHA.4324@TK2MSFTNGP05.phx.gbl">news:edo YhFssGHA.4324=
@TK2MSFTNGP05.phx.gbl...

also i tried this:

 

 

 

=
size=3D2>          &nbs=
p;=20
=
<%
          &nbs=
p;=20
catID =
=
Request.QueryString("catID")
       =
;    =20
SQL_Get_Products =3D "SELECT products.catID, products.prodID,=20
products.prod_price, products.prod_title, products.prod_img_url,=20
categories.catID FROM products, categories WHERE products.catID =3D '" =
&=20
catID &=20
=
"'"
           =
=20
rs.Open SQL_Get_Products ,=20
=
conn
           =
;=20
%>

 

 

all records are displayed 2 times =
each....not=20
sure whyl.

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"James Jones" < =
href=3D"mailto:jamisonburrous08@insightbb.com">jamisonburrou s08@insightbb=
..com>=20
wrote in message =
href=3D"news:eIVpvwrsGHA.1632@TK2MSFTNGP06.phx.gbl">news:eIV pvwrsGHA.1632=
@TK2MSFTNGP06.phx.gbl...

I was wondering if i can create 2 =
server=20
objects for my MySQL database. here is my code:

 

 

=
size=3D2>          &nbs=
p;=20
<!--#INCLUDE=20
=
FILE=3D"connection.asp"-->
      &nbs=
p;    =20
=
<%
          &nbs=
p;=20
catID =
=
Request.QueryString("catID")
       =
;    =20
SQL_Get_Products =3D "Select catID, prodID, prod_price, prod_title,=20
prod_img_url FROM products WHERE catID =3D '" & catID &=20
=
"'"
           =
=20
rs.Open SQL_Get_Products ,=20
=
conn
           =
;=20
SQL_Get_Categories =3D "Select * FROM categories WHERE parent_cat =
=3D '" &=20
catID &=20
=
"'"
           =
=20
rs2.Open SQL_Get_Categories ,=20
=
conn
           =
;=20
%>

 

 

 

Connection.asp:

 

 

 

<%
server2 =3D =
"XXXXXXXXX"
database =
"XXXXXXXXXXX"
username =3D "XXXXXXXXXXXX"
password =
"XXXXXXXXXXXX"
sConnection =3D "DRIVER=3D{MySQL ODBC 3.51 =
Driver}; SERVER=3D"=20
& server2 & "; DATABASE=3D" & database & "; UID=3D" =
&=20
username & ";PASSWORD=3D" & password & "; =
OPTION=3D3"
Set Conn =
=
Server.CreateObject("ADODB.Connection")
Conn.Open(sConnection)
set =
rs=20
=3D Server.CreateObject("ADODB.recordset")
set rs2 =
Server.CreateObject("ADODB.recordset")
%>

 

 

 

 

 

 

My error is:

 

 


Microsoft VBScript runtime error=20
'800a01a8'

Object required: ''=20

/shoppingcart/index.asp face=3DArial=20
size=3D2>, line 74


 


 


 


 


 


can anyone help me? PLEASE!!! i need to get one field out of one =
table,=20
and all the rest out of the other.......


 


 


Thanks,


James



------=_NextPart_000_021F_01C6B2A5.AEF704D0--