|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
win2k asp connection to data source on unix
hi
i'm trying to use an odbc driver to connect from an asp page to a data source (dbase) on unix sunsolaris. is this poss ? the driver is installed though i cant seem to do it through dreamweaver ultradev - can i do it through the ftp connection ? what would i input as the source on the following to initiate the connection in the asp page ? "Provider= "MSDASQL"; Data Source= server name ? "Database=test;User ID=sa;Password=blabla" or how would i do it using the followign as an include file ? <% ' FileName="Connection_odbc_conn_dsn.htm" ' Type="ADO" ' DesigntimeType="ADO" ' HTTP="false" ' Catalog="" ' Schema="" Dim MM_conDwmx1_STRING MM_conDwmx1_STRING = "dsn=dwmx1;" %> cheers chris |
|
#2
|
|||
|
|||
|
Perhaps you might want to look into using a *provider* as opposed to a *driver*
Have a look here: http://www.able-consulting.com/ADO_Conn.htm Oh and feel free to bookmark the web site! Hope this helps! Sincerely Vlince |
|
#3
|
|||
|
|||
|
thanks vlince
the application provider has only produced an odbc driver and not an ole db provider as far as i'm aware so if it did it would be - oConn.Open "Provider=MSDASQL;" & _ "Network Library=DBMSSOCN;" & _ "Data Source=xxx.xxx.xxx.xxx,1433;" & _ "Initial Catalog=myDatabaseName;" & _ "User ID=myUsername;" & _ "Password=myPassword" how about to using dsn - would it be something like oConn.Open "DSN=mySystemDSN;" & _ "Network Library=DBMSSOCN;" & _ "Data Source=xxx.xxx.xxx.xxx,1433;" & _ "Initial Catalog=myDatabaseName;" & _ "Uid=myUsername;" & _ "Pwd=myPassword" i seem to be confusing myself because the driver is accessed ok through programs/applications/odbc source/system dsn ok and then when i click on the server option itse set up to with unix, the ip address, port 7000, the username and password. i'm wondering how to replicate this in a connection ssi ? i've bookmarked the site. cheers chris |
|
#4
|
|||
|
|||
|
This is an example of how *I* do it sometimes.
1) I create a SSI called i_database.asp that I put inside a folder called *include* The code inside the i_database.asp file looks like this: <% Const CONNECTION_STRING = "PROVIDER=SQLOLEDB; Data Source=server_name; Initial Catalog=database_name; User Id=sa; pwd=test" %> Notice that the provider I use is for SQL Server not MySQL That's all I have, notice I don't have the instruction: <%@ Language=VBScript %> at the top of the page because the way I use it is like this: Assuming I'm inside the default.asp page and that I need to connect to my database, then all I do is: ----------------------------------------------------------------------------- <%@ Language=VBScript %> <%Option Explicit%> <!--#include file="include/i_database.asp"--> <% Dim objConn Set objConn= Server.CreateObject ("ADODB.Connection") objConn.Open CONNECTION_STRING . . .rest of code. . . %> ----------------------------------------------------------------------------- Hope this helps! Sincerely Vlince |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > win2k asp connection to data source on unix |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|