Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: VBScript


Message #1 by "Phil Perks" <philp@w...> on Wed, 14 Jun 2000 10:9:6
-----Original Message-----

From: PeterJayM@a... [mailto:PeterJayM@a...]

Sent: 14 June 2000 02:31

To: support@w...

Subject: VBScript 2718





I'm trying to set up a server side database using an ASP page coded in 

VBScript.  Towards this end, I have an access database made and I'm using a 

section of the code from the book (VBScript Programmer's Reference, Chapter 

15, p444), altered only in the fact that the path to my database is  

different.  A copy of my code is found below;

Dim cnNorthwind

Dim rsCategory



' Create the connection object

Set cnNorthwind = CreateObject("ADODB.Connection")

' Set the connection string

cnNorthwind.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;" _

  & "User ID=Admin; Data Source=C:\inetpub\wwwroot\fon\fon.mdb"



' Open the connection

cnNorthwind.Open



' Create the recordset object

Set rscategory = CreateObject("ADODB.Recordset")

' Open the categories table

rsCategory.Open "Categories", cnNorthwind, , , adCmdTable



' Close and destroy the recordset object

rsCategory.Close

Set rsCategory = nothing

' close and destroy the connection object

cnNorthwind.Close

Set cnNorthwind = Nothing



an error message results stating "ADO could not find the specified 

provider."



I can get things pointed properly if I use the ODBC interface which comes

with Win98 (under control panel), but if I want to set up a remote server

side data base, I can't very well keep using the Window's interface.  So 

the question is; what do I have to do to get the code from the book to work 

on my system?  Thank you for your time.

Pete Mikesell

Message #2 by "Ken Schaefer" <ken.s@a...> on Wed, 14 Jun 2000 22:48:08 +1000
Go here:



http://www.microsoft.com/data



and download MDAC v2.5 and you should be able to use the connection string

that you are using (you can actually update the 3.51 to 4.0)



Cheers

Ken



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

> From: PeterJayM

> Sent: 14 June 2000 02:31

> To: support@w...

> Subject: VBScript 2718

>

>

> I'm trying to set up a server side database using an ASP page coded in

> VBScript.  Towards this end, I have an access database made and I'm using

a

> section of the code from the book (VBScript Programmer's Reference,

Chapter

> 15, p444), altered only in the fact that the path to my database is

> different.  A copy of my code is found below;

> Dim cnNorthwind

> Dim rsCategory

>

> ' Create the connection object

> Set cnNorthwind = CreateObject("ADODB.Connection")

> ' Set the connection string

> cnNorthwind.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;" _

>   & "User ID=Admin; Data Source=C:\inetpub\wwwroot\fon\fon.mdb"

>

> ' Open the connection

> cnNorthwind.Open

>

> ' Create the recordset object

> Set rscategory = CreateObject("ADODB.Recordset")

> ' Open the categories table

> rsCategory.Open "Categories", cnNorthwind, , , adCmdTable

>

> ' Close and destroy the recordset object

> rsCategory.Close

> Set rsCategory = nothing

> ' close and destroy the connection object

> cnNorthwind.Close

> Set cnNorthwind = Nothing

>

> an error message results stating "ADO could not find the specified

> provider."

>

> I can get things pointed properly if I use the ODBC interface which comes

> with Win98 (under control panel), but if I want to set up a remote server

> side data base, I can't very well keep using the Window's interface.  So

> the question is; what do I have to do to get the code from the book to

work

> on my system?  Thank you for your time.

> Pete Mikesell



Message #3 by "Philip.Ware" <Philip.Ware@e...> on Wed, 14 Jun 2000 14:00:51 +0100
I have a SQL query that works in 3.51 but gives me an 

"unknown error" in VB when using 4.0



I have upgraded to MDac_Typ 2.5



Although the same sql text works in Access 97...



The query is a simple LEFT OUTER JOIN with two small tables.



any ideas?



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

> From: Ken Schaefer 

> Sent: 14 June 2000 13:48

> To: ASP Databases

> Subject: [asp_databases] Re: VBScript

> 

> 

> Go here:

> 

> http://www.microsoft.com/data

> 

> and download MDAC v2.5 and you should be able to use the 

> connection string

> that you are using (you can actually update the 3.51 to 4.0)

> 

> Cheers

> Ken

Message #4 by "Ken Schaefer" <ken.s@a...> on Thu, 15 Jun 2000 12:36:03 +1000
This is a VB problem you are having? Or an ASP problem?



I can't think of anything off the top of my head - I'd need to look at code,

but I don't know if posting a whole pile of VB is what this list is for.

Perhaps a VB list?



Cheers

Ken



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

From: "Philip.Ware" 

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

Sent: Wednesday, June 14, 2000 11:00 PM

Subject: [asp_databases] Re: VBScript





> I have a SQL query that works in 3.51 but gives me an

> "unknown error" in VB when using 4.0

>

> I have upgraded to MDac_Typ 2.5

>

> Although the same sql text works in Access 97...

>

> The query is a simple LEFT OUTER JOIN with two small tables.

>

> any ideas?






  Return to Index