|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Error?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|