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:
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  
Old July 3rd, 2003, 09:22 AM
chrisd33 chrisd33 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 38 chrisd33 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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

Reply With Quote
  #2  
Old July 3rd, 2003, 12:12 PM
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
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

Reply With Quote
  #3  
Old July 4th, 2003, 09:33 AM
chrisd33 chrisd33 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 38 chrisd33 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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

Reply With Quote
  #4  
Old July 4th, 2003, 09:52 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
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > win2k asp connection to data source on unix


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