Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Opening a Connection Problem


Message #1 by "Pat Waddington" <paw@s...> on Thu, 19 Oct 2000 10:53:03 +0100
This is a multi-part message in MIME format.



------=_NextPart_000_0005_01C039BA.C13D6360

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



Hi,



Can anyone please tell what is wrong with the following piece of code?



 -------------

Dim objConn



Set objConn =3D Server.CreateObject("ADODB.Connection")



strConnect =3D "Provider=3DMicrosoft.Jet.OLEDB.4.0;Data 

Source=3DC:\WEBSHARE\WWWROOT\test\Registration.mdb;Persist Security 

Info=3DFalse"



objConn.Open =3D strConnect



---------

When I try to run it, I get the message:



Microsoft VBScript runtime error '800a01b6'



Object doesn't support this property or method: 'objConn.Open'



I'm really puzzled - the only thing I can think of is that when I 

installed ASP I had a message to say a couple of files had been 

incorrectly registered - no info provided as to which files, and I've 

encountered no other problems.



Any clues or answers gratefully accepted.



Thank you

Pat Waddington






Message #2 by Ian Nutt <iann@w...> on Thu, 19 Oct 2000 11:48:02 +0100
Pat, 



(I'm assuming that, in your message below, the message transfer system has

replaced each "=" with "=3D"...)



Looks like you're writing 



	objConn.Open = strConnect



Note that .Open is a method, not a property.  So the correct syntax is



	objConn.Open strConnect



Ian

______________________________

Ian Nutt, Wrox Press Ltd

iann@w...   

http://www.wrox.com

http://www.asptoday.com

http://www.wroxconferences.com

http://p2p.wrox.com











-----Original Message-----

From: Pat Waddington [mailto:paw@s...]

Sent: Thursday, October 19, 2000 7:47 PM

To: ASP Databases

Subject: [asp_databases] Opening a Connection Problem





This is a multi-part message in MIME format.



------=_NextPart_000_0005_01C039BA.C13D6360

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



Hi,



Can anyone please tell what is wrong with the following piece of code?



 -------------

Dim objConn



Set objConn =3D Server.CreateObject("ADODB.Connection")



strConnect =3D "Provider=3DMicrosoft.Jet.OLEDB.4.0;Data 

Source=3DC:\WEBSHARE\WWWROOT\test\Registration.mdb;Persist Security 

Info=3DFalse"



objConn.Open =3D strConnect



---------

When I try to run it, I get the message:



Microsoft VBScript runtime error '800a01b6'



Object doesn't support this property or method: 'objConn.Open'



I'm really puzzled - the only thing I can think of is that when I 

installed ASP I had a message to say a couple of files had been 

incorrectly registered - no info provided as to which files, and I've 

encountered no other problems.



Any clues or answers gratefully accepted.



Thank you

Pat Waddington






Message #3 by Nisha Nambiar <nishanam@y...> on Thu, 19 Oct 2000 06:43:19 -0700 (PDT)
Hi

I think the error is here objConn.Open =3D strConnect

You don't need an = sign.

The code should be



objConn.Open 3D strConnect or objConn.Open strConnect

Try this

Nisha

--- Pat Waddington <paw@s...> wrote:

> This is a multi-part message in MIME format.

> 

> ------=_NextPart_000_0005_01C039BA.C13D6360

> Content-Type: text/plain;

> 	charset="iso-8859-1"

> Content-Transfer-Encoding: quoted-printable

> 

> Hi,

> 

> Can anyone please tell what is wrong with the

> following piece of code?

> 

>  -------------

> Dim objConn

> 

> Set objConn =3D

> Server.CreateObject("ADODB.Connection")

> 

> strConnect =3D

> "Provider=3DMicrosoft.Jet.OLEDB.4.0;Data 

>

Source=3DC:\WEBSHARE\WWWROOT\test\Registration.mdb;Persist

> Security 

> Info=3DFalse"

> 

> objConn.Open =3D strConnect

> 

> ---------

> When I try to run it, I get the message:

> 

> Microsoft VBScript runtime error '800a01b6'

> 

> Object doesn't support this property or method:

> 'objConn.Open'

> 

> I'm really puzzled - the only thing I can think of

> is that when I 

> installed ASP I had a message to say a couple of

> files had been 

> incorrectly registered - no info provided as to

> which files, and I've 

> encountered no other problems.

> 

> Any clues or answers gratefully accepted.

> 

> Thank you

> Pat Waddington

> 

> ------=_NextPart_000_0005_01C039BA.C13D6360

> Content-Type: text/html;

> 	charset="iso-8859-1"

> Content-Transfer-Encoding: quoted-printable

> 

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0

> Transitional//EN">

> <HTML><HEAD>

> <META content=3D"text/html; charset=3Diso-8859-1" 

> http-equiv=3DContent-Type>

> <META content=3D"MSHTML 5.00.3105.105"

> name=3DGENERATOR>

> <STYLE></STYLE>

> </HEAD>

> <BODY bgColor=3D#ffffff>

> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>

> <DIV> </DIV>

> <DIV><FONT face=3DArial size=3D2>Can anyone please

> tell what is wrong 

> with the

> following piece of code?</FONT></DIV>

> <DIV> </DIV>

> <DIV><FONT face=3DArial

> size=3D2> -------------</DIV>

> <P class=3DMsoNormal

> style=3D"tab-stops: 18.0pt 36.0pt 54.0pt 72.0pt

> 90.0pt 108.0pt 126.0pt 

> 144.0pt 162.0pt 180.0pt 198.0pt 216.0pt 234.0pt

> 252.0pt 270.0pt 288.0pt 

> 306.0pt 324.0pt 342.0pt 360.0pt 378.0pt 396.0pt

> 414.0pt 432.0pt 450.0pt 

> 468.0pt 486.0pt 504.0pt 522.0pt 540.0pt 558.0pt

> 576.0pt; 

> mso-layout-grid-align: none"><SPAN

> style=3D"COLOR: black; mso-bidi-font-size:

> 9.0pt">Dim 

> objConn<?xml:namespace

> prefix =3D o ns =3D

> "urn:schemas-microsoft-com:office:office"

> /><o:p></o:p></SPAN></P>

> <P class=3DMsoNormal

> style=3D"tab-stops: 18.0pt 36.0pt 54.0pt 72.0pt

> 90.0pt 108.0pt 126.0pt 

> 144.0pt 162.0pt 180.0pt 198.0pt 216.0pt 234.0pt

> 252.0pt 270.0pt 288.0pt 

> 306.0pt 324.0pt 342.0pt 360.0pt 378.0pt 396.0pt

> 414.0pt 432.0pt 450.0pt 

> 468.0pt 486.0pt 504.0pt 522.0pt 540.0pt 558.0pt

> 576.0pt; 

> mso-layout-grid-align: none"><SPAN

> style=3D"COLOR: black; mso-bidi-font-size:

> 9.0pt">Set objConn =3D

>

Server.CreateObject("ADODB.Connection")<o:p></o:p></SPAN></P>

> <P class=3DMsoNormal

> style=3D"tab-stops: 18.0pt 36.0pt 54.0pt 72.0pt

> 90.0pt 108.0pt 126.0pt 

> 144.0pt 162.0pt 180.0pt 198.0pt 216.0pt 234.0pt

> 252.0pt 270.0pt 288.0pt 

> 306.0pt 324.0pt 342.0pt 360.0pt 378.0pt 396.0pt

> 414.0pt 432.0pt 450.0pt 

> 468.0pt 486.0pt 504.0pt 522.0pt 540.0pt 558.0pt

> 576.0pt; 

> mso-layout-grid-align: none"><SPAN

> style=3D"COLOR: black; mso-bidi-font-size:

> 9.0pt">strConnect =3D

> "Provider=3DMicrosoft.Jet.OLEDB.4.0;Data

>

Source=3DC:\WEBSHARE\WWWROOT\test\Registration.mdb;Persist

> Security

> Info=3DFalse"<o:p></o:p></SPAN></P>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New

> Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family:

> 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language:

> EN-US; 

> mso-bidi-language: AR-SA">objConn.Open

> =3D strConnect</SPAN></DIV>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New

> Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family:

> 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language:

> EN-US; 

> mso-bidi-language: AR-SA"></SPAN> </DIV>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New

> Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family:

> 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language:

> EN-US; 

> mso-bidi-language: AR-SA">---------</SPAN></DIV>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New

> Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family:

> 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language:

> EN-US; 

> mso-bidi-language: AR-SA">When

> I try to run it, I get the message:</SPAN></DIV>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New

> Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family:

> 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language:

> EN-US; 

> mso-bidi-language: AR-SA"><FONT

> face=3DArial size=3D2> </DIV>

> <P class=3DMsoNormal>Microsoft VBScript runtime

> error '800a01b6' 

> <o:p></o:p></P>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE:

> 12pt; 

> mso-fareast-font-family: 'Times New Roman';

> mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language:

> AR-SA">Object

> doesn't support this property or method:

> 'objConn.Open' </SPAN></DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE:

> 12pt; 

> mso-fareast-font-family: 'Times New Roman';

> mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: 

> AR-SA"></SPAN> </DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE:

> 12pt; 

> mso-fareast-font-family: 'Times New Roman';

> mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language:

> AR-SA">I'm

> really puzzled - the only thing I can think of is

> that when I installed 

> ASP I

> had a message to say a couple of files had been

> incorrectly registered - 

> no info

> provided as to which files, and I've encountered no

> other 

> problems.</SPAN></DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE:

> 12pt; 

> mso-fareast-font-family: 'Times New Roman';

> mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: 

> AR-SA"></SPAN> </DIV>

> 

=== message truncated ===

Message #4 by "Pat Waddington" <paw@s...> on Thu, 19 Oct 2000 20:16:52 +0100
Dear Ian and Nisha



Thank you for your quick replies to my question. Ian - you were right about

the  = signs being replaced, but also spot on with the syntax error. I must

have checked it a dozen times against the book, but just didn't see the

mistake I'd made. I must try harder!



I would also like to take this opportunity to thank everyone who submits

questions and those who answer them - this forum is a great place to learn,

especially when the same questions puzzle several people.



Regards to all

Pat

----- Original Message -----

From: "Ian Nutt" <iann@w...>

To: "ASP Databases" <asp_databases@p...>

Sent: Thursday, October 19, 2000 11:48 AM

Subject: [asp_databases] RE: Opening a Connection Problem





> Pat,

>

> (I'm assuming that, in your message below, the message transfer system has

> replaced each "=" with "=3D"...)

>

> Looks like you're writing

>

> objConn.Open = strConnect

>

> Note that .Open is a method, not a property.  So the correct syntax is

>

> objConn.Open strConnect

>

> Ian

> ______________________________

> Ian Nutt, Wrox Press Ltd

> iann@w...

> http://www.wrox.com

> http://www.asptoday.com

> http://www.wroxconferences.com

> http://p2p.wrox.com

>

>

>

>

>

> -----Original Message-----

> From: Pat Waddington [mailto:paw@s...]

> Sent: Thursday, October 19, 2000 7:47 PM

> To: ASP Databases

> Subject: [asp_databases] Opening a Connection Problem

>

>

> This is a multi-part message in MIME format.

>

> ------=_NextPart_000_0005_01C039BA.C13D6360

> Content-Type: text/plain;

> charset="iso-8859-1"

> Content-Transfer-Encoding: quoted-printable

>

> Hi,

>

> Can anyone please tell what is wrong with the following piece of code?

>

>  -------------

> Dim objConn

>

> Set objConn =3D Server.CreateObject("ADODB.Connection")

>

> strConnect =3D "Provider=3DMicrosoft.Jet.OLEDB.4.0;Data 

> Source=3DC:\WEBSHARE\WWWROOT\test\Registration.mdb;Persist Security 

> Info=3DFalse"

>

> objConn.Open =3D strConnect

>

> ---------

> When I try to run it, I get the message:

> 

> Microsoft VBScript runtime error '800a01b6'

>

> Object doesn't support this property or method: 'objConn.Open'

>

> I'm really puzzled - the only thing I can think of is that when I 

> installed ASP I had a message to say a couple of files had been 

> incorrectly registered - no info provided as to which files, and I've 

> encountered no other problems.

>

> Any clues or answers gratefully accepted.

>

> Thank you

> Pat Waddington

>

> ------=_NextPart_000_0005_01C039BA.C13D6360

> Content-Type: text/html;

> charset="iso-8859-1"

> Content-Transfer-Encoding: quoted-printable

>

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

> <HTML><HEAD>

> <META content=3D"text/html; charset=3Diso-8859-1" 

> http-equiv=3DContent-Type>

> <META content=3D"MSHTML 5.00.3105.105" name=3DGENERATOR>

> <STYLE></STYLE>

> </HEAD>

> <BODY bgColor=3D#ffffff>

> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>

> <DIV> </DIV>

> <DIV><FONT face=3DArial size=3D2>Can anyone please tell what is wrong 

> with the

> following piece of code?</FONT></DIV>

> <DIV> </DIV>

> <DIV><FONT face=3DArial size=3D2> -------------</DIV>

> <P class=3DMsoNormal

> style=3D"tab-stops: 18.0pt 36.0pt 54.0pt 72.0pt 90.0pt 108.0pt 126.0pt 

> 144.0pt 162.0pt 180.0pt 198.0pt 216.0pt 234.0pt 252.0pt 270.0pt 288.0pt 

> 306.0pt 324.0pt 342.0pt 360.0pt 378.0pt 396.0pt 414.0pt 432.0pt 450.0pt 

> 468.0pt 486.0pt 504.0pt 522.0pt 540.0pt 558.0pt 576.0pt; 

> mso-layout-grid-align: none"><SPAN

> style=3D"COLOR: black; mso-bidi-font-size: 9.0pt">Dim 

> objConn<?xml:namespace

> prefix =3D o ns =3D "urn:schemas-microsoft-com:office:office"

> /><o:p></o:p></SPAN></P>

> <P class=3DMsoNormal

> style=3D"tab-stops: 18.0pt 36.0pt 54.0pt 72.0pt 90.0pt 108.0pt 126.0pt 

> 144.0pt 162.0pt 180.0pt 198.0pt 216.0pt 234.0pt 252.0pt 270.0pt 288.0pt 

> 306.0pt 324.0pt 342.0pt 360.0pt 378.0pt 396.0pt 414.0pt 432.0pt 450.0pt 

> 468.0pt 486.0pt 504.0pt 522.0pt 540.0pt 558.0pt 576.0pt; 

> mso-layout-grid-align: none"><SPAN

> style=3D"COLOR: black; mso-bidi-font-size: 9.0pt">Set objConn =3D

> Server.CreateObject("ADODB.Connection")<o:p></o:p></SPAN></P>

> <P class=3DMsoNormal

> style=3D"tab-stops: 18.0pt 36.0pt 54.0pt 72.0pt 90.0pt 108.0pt 126.0pt 

> 144.0pt 162.0pt 180.0pt 198.0pt 216.0pt 234.0pt 252.0pt 270.0pt 288.0pt 

> 306.0pt 324.0pt 342.0pt 360.0pt 378.0pt 396.0pt 414.0pt 432.0pt 450.0pt 

> 468.0pt 486.0pt 504.0pt 522.0pt 540.0pt 558.0pt 576.0pt; 

> mso-layout-grid-align: none"><SPAN

> style=3D"COLOR: black; mso-bidi-font-size: 9.0pt">strConnect =3D

> "Provider=3DMicrosoft.Jet.OLEDB.4.0;Data

> Source=3DC:\WEBSHARE\WWWROOT\test\Registration.mdb;Persist Security

> Info=3DFalse"<o:p></o:p></SPAN></P>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family: 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language: EN-US; 

> mso-bidi-language: AR-SA">objConn.Open

> =3D strConnect</SPAN></DIV>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family: 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language: EN-US; 

> mso-bidi-language: AR-SA"></SPAN> </DIV>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family: 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language: EN-US; 

> mso-bidi-language: AR-SA">---------</SPAN></DIV>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family: 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language: EN-US; 

> mso-bidi-language: AR-SA">When

> I try to run it, I get the message:</SPAN></DIV>

> <DIV><SPAN

> style=3D"COLOR: black; FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-bidi-font-size: 9.0pt; mso-fareast-font-family: 'Times New Roman'; 

> mso-ansi-language: EN-US; mso-fareast-language: EN-US; 

> mso-bidi-language: AR-SA"><FONT

> face=3DArial size=3D2> </DIV>

> <P class=3DMsoNormal>Microsoft VBScript runtime error '800a01b6' 

> <o:p></o:p></P>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Object

> doesn't support this property or method: 'objConn.Open' </SPAN></DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: 

> AR-SA"></SPAN> </DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: AR-SA">I'm

> really puzzled - the only thing I can think of is that when I installed 

> ASP I

> had a message to say a couple of files had been incorrectly registered - 

> no info

> provided as to which files, and I've encountered no other 

> problems.</SPAN></DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: 

> AR-SA"></SPAN> </DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Any

>

> clues or answers gratefully accepted.</SPAN></DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: 

> AR-SA"></SPAN> </DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Thank

> you</SPAN></DIV>

> <DIV><SPAN

> style=3D"FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt; 

> mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; 

> mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Pat

> Waddington</SPAN></FONT></SPAN></FONT></DIV>

>

> </BODY></HTML>

>

> ------=_NextPart_000_0005_01C039BA.C13D6360--

>

>

>






  Return to Index