Ask a Question related to ASP Components, Design and Development.
-
KLAU #1
ASP Data Source Connection Help
I am trying to create a connection in my ASP page to a SQL Server
database. This is my code for the connection string:
<%Option Explicit%>
<%
Dim conn
Dim ConnectionString
Dim RsList
Set conn = New ADODB.Connection
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "Driver={SQL Server};" & _
"Server=HOEALG01;" & _
"Database=Tool;" & _
"Uid=tool;" & _
"Pwd=tool;" &_
conn.Open
.....%>
I get the following error when I run the page.
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'ADODB'
/gasmktbest/Scripts/Submit.asp, line 26
Any ideas?
KLAU Guest
-
Data Source Connection Verification Fails
I have been trying for hours to get Cold Fusion admnistrator to accept my data souce. I am using SQL Server 2000 on my development computer. Databse... -
Connection to data source error
Hi, For the past week I am continually getting disconnected from my data source in cold fusion, and have to reconnect. But when I go to do that,... -
Data Source Connection Problems -- CF6 and CF7
We have doing development locally running CF6 on a local XP SP2 machine with the latest version of the MS MSDE server. When we installed CF6 last... -
DB Connection Error: Data source name not found
Hei, I am using Dreamweaver MX 6.1, XP SP2 and trying to connect to a MS Access db. I can open & preview the page & data correctly using IIS... -
connect to the data source with or without Connection object
To connect the ASP application to data source, we can use ADO.Connection object Const connectionString = "Provider=Microsoft.Jet.OLEDB.3.51; Data... -
Ray at #2
Re: ASP Data Source Connection Help
You're attempting to use VB code in VBScript. Try:
Set conn = CreateObject("ADODB.Connection")
Oh, wait, you already have that. Drop the line with the "New
ADODB.Connection." Even in VB, you shouldn't use that line, as it'll create
an unnecessary object before it needs to exist.
Also, you may want to switch to an OLEDB connection. Take a look at
[url]http://www.connectionstrings.com/[/url].
Ray at work
"KLAU" <karen.lau@mail.utexas.edu> wrote in message
news:5733cc1a.0311040659.15371d35@posting.google.c om...> I am trying to create a connection in my ASP page to a SQL Server
> database. This is my code for the connection string:
>
> <%Option Explicit%>
> <%
> Dim conn
> Dim ConnectionString
> Dim RsList
>
> Set conn = New ADODB.Connection
> Set conn = Server.CreateObject("ADODB.Connection")
> conn.ConnectionString = "Driver={SQL Server};" & _
> "Server=HOEALG01;" & _
> "Database=Tool;" & _
> "Uid=tool;" & _
> "Pwd=tool;" &_
> conn.Open
>
> ....%>
>
> I get the following error when I run the page.
>
> Microsoft VBScript runtime error '800a01f4'
>
> Variable is undefined: 'ADODB'
>
> /gasmktbest/Scripts/Submit.asp, line 26
>
>
> Any ideas?
Ray at Guest
-
Karen Lau #3
Re: ASP Data Source Connection Help
Thanks Ray.
I tried what you said by dropping the conn as New ADODB.Connection and
changing to a OLE DB connection string. This is my code:
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "Provider=sqloledb;Data
Source=HOEALG01\Tool;Initial Catalog=pubs;User Id=tool;Password=tool;"
conn.Open
It returns an error:
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBMSSOCN]General network error. Check your network documentation.
/gasmktbest/Scripts/Submit.asp, line 33
What does this mean?
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Karen Lau Guest
-
Ray at #4
Re: ASP Data Source Connection Help
Heh. It means there was a general network error. ;] Can you ping the SQL
server from this computer? Can you connect to this SQL server from this
machine using query analyzer or osql? Is the server behind a firewall? Are
you using the default port for SQL? Is it open?
Ray at work
"Karen Lau" <karen.lau@mail.utexas.edu> wrote in message
news:%23WXZ8gvoDHA.2820@TK2MSFTNGP10.phx.gbl...> Thanks Ray.
>
> I tried what you said by dropping the conn as New ADODB.Connection and
> changing to a OLE DB connection string. This is my code:
>
> Set conn = Server.CreateObject("ADODB.Connection")
> conn.ConnectionString = "Provider=sqloledb;Data
> Source=HOEALG01\Tool;Initial Catalog=pubs;User Id=tool;Password=tool;"
> conn.Open
>
> It returns an error:
> Microsoft OLE DB Provider for SQL Server error '80004005'
>
> [DBMSSOCN]General network error. Check your network documentation.
>
> /gasmktbest/Scripts/Submit.asp, line 33
>
> What does this mean?
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Ray at Guest
-
Karen Lau #5
Re: ASP Data Source Connection Help
Thanks Ray!
Unfortunately I still get an error after your directions. Here's my
changed code:
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "Provider=sqloledb;Data
Source=HOEALG01\Tool;Initial Catalog=pubs;User Id=tool;Password=tool;"
conn.Open
Heres the error:
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBMSSOCN]General network error. Check your network documentation.
/gasmktbest/Scripts/Submit.asp, line 33
Any ideas?
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Karen Lau Guest



Reply With Quote

