Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP connection strings help for Oracle 10g XE and Sybase 12.5 wanted!

Status
Not open for further replies.

ptmcs

Technical User
Oct 1, 2004
38
GB
Hi,

Firstly, apologies if this seems a dumb question - I've looked around the web and seem to get a lot of conflicting information and get swamped with information about ASP.NET which is not what i am using.

I am just starting out with ASP.

I have a basic script which I can connect to an Oracle 9 database OK.

I need to connect to an Oracle 10g XE database and would really appreciate an example of the connection string required. (DSN-less i think)

I also need to connect to a Sybase ASE 12.5 database via ASP (as a seperate thing to above) and equally need a connection string (again DSN less)

Sybase especially is one which just does not seem to have clear information - unfortunately I don't get to have a say in whic rdbms we have to use.

Many thanks in advance for any assistance!
 
Hi - have tried that site without success - hence it would be great to have a clear working example from someone who has succesfully connected.
 
this is how i connected successful to the sybase database at my previous work place:

Code:
conn.Open "Provider= Sybase ASE OLE DB Provider;" &_
"Data Source= mydsname;"&_
"User Id=readonly;"&_
"Password=readonly"

try it out...

-DNG
 
On further investigation, looks like its 12.5 ASE database - but Sybase open Client is 11. So solution for Sybase was (after setting up ODBS entry):

<%
Dim objConnection
Dim objRecordset
Set objConnection = Server.CreateObject("ADODB.Connection")

With objConnection
.ConnectionString = "Driver={SYBASE SYSTEM 11};Srvr=SvrNm;Uid=DBuser;Pwd=DBpasswd;Database=DBname"

_________________________________________________________
 
Still need help on the Oracle XE connection though!

This works ok for Oracle 9 but not for Oracle XE:


<% Dim objConnection
Dim objRecordset
Set objConnection = Server.CreateObject("ADODB.Connection")
With objConnection
.ConnectionString = "Provider=MSDAORA.1;Password=cmtest2;User ID=cmtest2;Data Source=stora;Persist Security Info=True"
.Open


 
Here was the answer in the end....
seems to work ok.

With objConnection
.ConnectionString = "Provider=MSDAORA.1;Password=DVD;User ID=DVD;Data Source=XE;Persist Security Info=True"

 
It is not working for me, I am using the code below. I am using the ODBC dsn name I created on my desktop for the Srvr parameter. Please help.

Sub Test()
Dim myConnection As ADODB.Connection
Dim myRecordSet As ADODB.Recordset
Set myConnection = New ADODB.Connection
With myConnection
.ConnectionString = "Driver={SYBASE SYSTEM 11};Srvr=dsn>;Uid=test;Pwd=test2;Database=testdb"
End With
Set myRecordSet = New ADODB.Recordset
myRecordSet.Open Source = "Table", ActiveConnection = myConnection
With myRecordSet
.MoveFirst
.Find Criteria:="Id='FR'"
If Not .EOF Then
.Fields("Sender").Value = "testDesc"
.Update
End If
End With
myRecordSet.Close
Set myRecordSet = Nothing
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top