473,748 Members | 2,260 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="Micros oft FrontPage 4.0">
<meta name="ProgId" content="FrontP age.Editor.Docu ment">
<title>Calendar </title>
</head>
<frameset cols="120" border=0 frameborder="0" >
<frame name="MAIN" src="calendar.a sp" 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 GetDataConnecti on function is now:

function GetDataConnecti on()
dim oConn, strConn
Set oConn = Server.CreateOb ject("ADODB.Con nection")

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

oConn.Connectio nString = strConn
oConn.Open
set GetDataConnecti on = 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 2082
"Jennifer" <J.**********@g mail.com> wrote in message
news:11******** *************@y 43g2000cwc.goog legroups.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="Micros oft FrontPage 4.0">
<meta name="ProgId" content="FrontP age.Editor.Docu ment">
<title>Calendar </title>
</head>
<frameset cols="120" border=0 frameborder="0" >
<frame name="MAIN" src="calendar.a sp" 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 GetDataConnecti on function is now:

function GetDataConnecti on()
dim oConn, strConn
Set oConn = Server.CreateOb ject("ADODB.Con nection")

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

oConn.Connectio nString = strConn
oConn.Open
set GetDataConnecti on = 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=WBC ORP501). DSNs
are setup using ODBC Manager in Control Panel. Get rid of the data source
line and replace it with "Server=your_SQ LServer_name" or
"Server=your_SQ LServer_ip_addr ess".
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
3542
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 because SQL Server has been using it successfully for years. I want to access the info on VMS from within PHP and this is when all goes pear shaped! I have tried various ways... 1) If I am in query analyser and type 'SELECT * FROM DNSNAME...TABLENAME' etc. This works fine. But if I try putting...
14
1860
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: ---------------------------------------------------------- Select 'Ranked' as Source, H.HotelName, H.TelNo, H.URL, H.Location, H.HotelID, Rank from (Hotels H Inner Join PrefHotels P on H.HotelID = P.HotelID) Inner Join Locations L on P.LocID = L.LocID where Rank is not null and Rank > 0 and L.LocID=2
1
1564
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 the connection string to the DB. To connect to the database I am using ADODB.Record, Cursor Type of Static, Lock Type of Readonly, command
0
5777
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 817. and following is my public data access class. using System.Data.OracleClient;
15
1843
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 on my application? I have found the class System.Text.Encoding, but the input looks like \uXXXX. I don't know how to do. Thank you,
1
1321
by: hangaround | last post by:
I have read some codes like following: /////////////////////////////////////////// SqlConnection* conn = new SqlConnection(S"Server=localhost;" S"Database=Northwind;" S"Integrated Security=true;"); adapter = new SqlDataAdapter(S"SELECT * FROM Employees", conn); eventHandler = new SqlEventHandler(adapter, this);
18
2463
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 a SQL database. Thanks, Ken
17
3248
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 it easy to move an app from development into production. I'm in the process of writing a site that will have lots of traffic so I'm trying to save resources everyplace that I can. My question is - do the web.config app settings get loaded once when the
0
5573
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
11
9455
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 there are many architect here. Software architecture is sorta new to me. I searched a little and did find this: http://www.velocityreviews.com/forums/t300246-bll-and-dal.html
0
8982
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8822
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
6792
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 presenter, Adolph Duprť who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6072
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4591
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3298
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 we have to send another system
2
2774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2205
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.