473,508 Members | 2,007 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP - data 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...l/calendar.asp

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
3 2221
I realized I made a typo above. I should have copied and pasted this,
but chose to type it out instead. The real GetDataConnection function
is

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

May 19 '06 #2
Okay, I'm sure you are all shaking your heads by now and wondering who
the heck the idiot is that's posting this, right? Well, last time I
copied and pasted from the previous post and didn't make the change I
needed. So again, here is the REAL correct funtion (it's just a
correction of semi colons in the connection string):

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

May 19 '06 #3
Jennifer wrote:
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...l/calendar.asp

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:


This isn't a question about HTML, it's about ASP. Best to find an ASP
newsgroup.
May 19 '06 #4

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

Similar topics

8
2939
by: Frnak McKenney | last post by:
Back when computer dinosaurs roamed the earth and the precursors to today's Internet were tiny flocks of TDMs living symbiotically with the silicon giants, tracking access to data processing...
4
2254
by: chris | last post by:
I open MySQL Manager and connect to my database. I then insert one record in to an InnoDB table in MySQL (4.0 and 4.1 alpha hosted on XP running mysqld --console). I then retrieve the record...
6
1768
by: Jon Davis | last post by:
I like the drag-and-drop accessibility of dragging a table to a Web Forms designer and seeing a SqlDataAdapter automatically created for me.. being able to create a DataSet from that is fun and...
2
6530
by: Robert Smith jr. | last post by:
Hello, Please pardon my newbie question ... I am building an ASP.NET page that displays a recordset with a Delete statement enabled (this all works fine). I want to Insert the current row...
4
1906
by: a | last post by:
Hey gang, quick question. Given an app where many classes will be acessing a database, what is the best way to go? a. A function that returns a connection string to each class, and lets them...
2
6858
by: Macca | last post by:
My app has an asynchronous socket server. It will have 20 clients connected to the server. Each client sends data every 500 millisecondsThe Connections once established will not be closed unless...
0
4649
by: Macca | last post by:
Hi, I am writing an asychronous socket server to handle 20+ simulataneous connections. I have used the example in MSDN as a base. The code is shown at end of question. Each connection has a...
3
1259
by: Ben R. | last post by:
Since the original thread is marked as answered, I thought I'd post here to ensure visibility. Hi John and Steven, I'm going the dataset route as access doesn't seem to be too keen on that...
20
37837
by: TC | last post by:
I need an automated procedure to copy data from an Access table to a SQL Server table. Speed is important. What is the recommended technique? I can export the data from Access, copy it via FTP,...
3
1963
by: Gary W. Smith | last post by:
I had a couple questions about data caching. We have a site that gets a huge amount of traffic to a few specific pages that have a lot of data on them (300k hits/hour during peak, about 6-10 data...
0
7226
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7125
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7328
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
5055
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4709
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3199
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1561
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
422
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.