ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 6th, 2003, 08:26 AM
chetwood chetwood is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 15 chetwood User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Error??

hi, can anyone help.

i've connected an access db to dreamweaver, i am using a local iss windows server to run the asp pages. however i can run all the pages fine until i put a dynamic table on a page using the record set in dreamweaver.

the error is:
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
/mysampleapp/customercomment.asp, line 8


line eight of the code is: Recordset1.ActiveConnection = MM_connGlobal_STRING


i am a bit of a beginner to all this, your help would be much appreciated.

thankyou

Reply With Quote
  #2  
Old November 6th, 2003, 10:10 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Bookmark this link:
http://www.able-consulting.com/ADO_Conn.htm

It's very important it'll help you in the near futur...

One thing you need to understand is that there are multiple ways you can connect to your database.

You can use a Wizard but you won't get your hands dirty and when you encounter a problem well...you're f**ked.

Anyway...

The first way is using an ODBC.
You must create, on the machine where your ASP page are, a System DSN(Data Source Name). To do that, you must go to:
Start-->Programs-->Administrative Tools-->Data Source(ODBC)
Click the second tab(System DSN) click on the Add... button, then follow the steps in little wizard(Ya I know, I said wizards are bad...but not this one:-))

This will create a System DSN that you'll be able to use within your ASP pages like so:
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open "XXX"
%>

XXX represents the name of the System DSN you've created.


Now another way is to use a DSN-Less connection what's that?
Well it's a DSN but Less :-)
Seriously, it's just another way to connect to your database and in your code, you'll have to use it like this:
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")

objConn.open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:\somepath\mydb.mdb;" & _
"Uid=admin;" & _
"Pwd="

%>

The nice thing about this approach is that you can modify this yourself, within the ASP page. If you, or someone, changes the PATH to the database, you can always manually change that inside the DSN-Less connection.

If you use the System DSN approach then you'll need to reconfigure the System DSN. If you're hosting the web site/application somewhere else then you'll need a PCAnywhere connection or use some sort or remote application to change it OR ask the System admin over there to change it for you.

A third way is to use an OLEDB connection now what is that?
Well it's almost the SAME thing as a DSN-Less connection but the only difference is that is uses a provider instead of a driver

Notice in the DSN-Less connection example, you see a Driver={...
You can think of it this way, if you see the word Driver you can tell that it is a DSN-Less connection. But if you see Provider this means it's an OLEDB connection.

The OLEDB Connection inside your code would look something like:
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")

objConn .Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\myDb.mdb;" & _
"User Id=admin;" & _
"Password="

%>
That's it!

Well there is another way...using a .udl file but 3 should be enough!

Remember to bookmark the link!

Hope this helps!
Sincerely

Vlince

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Error??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT