472,342 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 software developers and data experts.

ASP & Database Connection Question

Hi. I don't know a whole bunch about html and asp pages, but I thought

I'd give it a try to see if I could get it to work. I found an example

for a calendar event page from Microsoft at:

http://msdn.microsoft.com/library/de...ary/en-us/dnas...

So using this example, I saved all the examples for each part of the
code as asp pages. I created a default htm page which opens the asp
pages. The code for that is:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Calendar</title>
</head>
<frameset cols="120" border=0 frameborder="0">
<frame name="MAIN" src="calendar.asp" noresize >
</frameset>
</html>
I opened this all in Front Page and published it to my local inetpub
directory. When trying to run it, I get the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
/calendar/Header.asp, line 43
I'm not sure what is causing this. Line 43 on the header.asp page is
blank, but anyway... I did check to make sure my connection string was

correct, with no typos. My modified GetDataConnection function is now:

function GetDataConnection()
dim oConn, strConn
Set oConn = Server.CreateObject("ADODB.Connection")

strConn = "Provider=SQLOLEDB.1; Persist Security Info=False; "
strConn = strConn & "User Id=CCLead; Password=xxxx;"
strConn = strConn & "Initial Catalog=CC Leadership; "
strConn = strConn & "Data Source=WBCORP501 "

oConn.ConnectionString = strConn
oConn.Open
set GetDataConnection = oConn
end function
I feel sure that I am missing something obvious, but not sure what.
Any suggestions for a newbie?
Thanks,
Jennifer

May 19 '06 #1
1 2019
"Jennifer" <J.**********@gmail.com> wrote in message
news:11*********************@y43g2000cwc.googlegro ups.com...
Hi. I don't know a whole bunch about html and asp pages, but I thought

I'd give it a try to see if I could get it to work. I found an example

for a calendar event page from Microsoft at:

http://msdn.microsoft.com/library/de...ary/en-us/dnas...

So using this example, I saved all the examples for each part of the
code as asp pages. I created a default htm page which opens the asp
pages. The code for that is:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Calendar</title>
</head>
<frameset cols="120" border=0 frameborder="0">
<frame name="MAIN" src="calendar.asp" noresize >
</frameset>
</html>
I opened this all in Front Page and published it to my local inetpub
directory. When trying to run it, I get the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
/calendar/Header.asp, line 43
I'm not sure what is causing this. Line 43 on the header.asp page is
blank, but anyway... I did check to make sure my connection string was

correct, with no typos. My modified GetDataConnection function is now:

function GetDataConnection()
dim oConn, strConn
Set oConn = Server.CreateObject("ADODB.Connection")

strConn = "Provider=SQLOLEDB.1; Persist Security Info=False; "
strConn = strConn & "User Id=CCLead; Password=xxxx;"
strConn = strConn & "Initial Catalog=CC Leadership; "
strConn = strConn & "Data Source=WBCORP501 "

oConn.ConnectionString = strConn
oConn.Open
set GetDataConnection = oConn
end function
I feel sure that I am missing something obvious, but not sure what.
Any suggestions for a newbie?
Thanks,
Jennifer


You are mixing types in your connection string. You are using (in the
beginning) what is known as a "DSN-less" (DSN = Data Source Name)
connection. But then you are providing a DSN (DataSource=WBCORP501). DSNs
are setup using ODBC Manager in Control Panel. Get rid of the data source
line and replace it with "Server=your_SQLServer_name" or
"Server=your_SQLServer_ip_address".
Alternatively, get rid of everything *but* the DataSource= line and setup a
DSN with the name WBCORP501 in ODBC. FYI the best performance will be
obtained using a DSN-less connection (it removes an extra layer of
complexity - i.e., ODBC).
May 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gazchurchend | last post by:
I am trying to connect to a legacy system running on VMS using the Attunity Connect ODBC driver from within PHP. I know the System DSN works...
14
by: CJM | last post by:
I have a query which produces different results in the Access query builder and in an ASP page (via ADO) An example of the query is:...
1
by: Stuart | last post by:
Hi, I have a web site that is built using FOxpro database (free table directory) running on a Win2003 server and IIS 6. I am using a DSN as...
0
by: ʹÃûÑï | last post by:
ORA-03114: not connected to ORACLE && MS's Bug?? DataBase:Oracle 817 using OracleClient,net framework 1.1 I'm using ADO.Net in C# with Oracle...
15
by: Bart | last post by:
Hi, I receive an utf8 character from a database, like 田 (Japanese Character, style: &#XXXXX). How can I visualize the Japanese character...
1
by: hangaround | last post by:
I have read some codes like following: /////////////////////////////////////////// SqlConnection* conn = new SqlConnection(S"Server=localhost;"...
18
by: Ken Kazinski | last post by:
Does anyone know of a good example for creating a access database and then tables within that database. All the examples I have found so far use...
17
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM...
11
by: gnewsgroup | last post by:
First, just in case, BLL = Business Logic Layer and DAL = Data Access Layer. I guess this is really a question about architecture. I believe...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.