Hi, I made this simple ASP page that connects to SAPDB... 
where 
test is the name of the DSN I had configured using SAPDB ODBC.
the "ADMIN" is the username and "a" is the password.

<%
Dim cnnSimple 
Dim rstSimple

set cnnSimple = Server.CreateObject("ADODB.Connection")
cnnSimple.Open "DSN=test", "ADMIN", "a"


set rstSimple = cnnSimple.Execute("Select * from temporal1")

Do While Not rstSimple.EOF 
        response.write (rstSimple.Fields("TOTAL").Value)
        rstSimple.MoveNext
Loop

rstSimple.Close

set rstSimple = Nothing
cnnSimple.Close

set cnnSimple = Nothing
%>


bye
Alex






"ing. fabio freddi" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
19/11/2002 04:32 a.m.

 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        problem odbc connection


A valid connection with Oracle using asp is
<%
Set Con = Server.CreateObject( "ADODB.Connection" )
     Con.Open "driver={Oracle ODBC driver};" & _
               "Server=ORCLSL;" &_
               "Uid=GEST;"&_
               "Pwd=manager;"
 
sqlString = ".........."
Con.Execute( sqlString )
%> 
 
I try to connect to sap db but i have a lot of problem.
 
<%
Set Con = Server.CreateObject( "ADODB.Connection" )
     Con.Open "driver={SAP DB 7.3 driver};" & _
               "Server=SERVER;" &_
               "Uid=TEST;"&_
               "Pwd=TEST;"
 
sqlString = ".........."
Con.Execute( sqlString )
%>
 
DO NOT WORK
 
ODBC DSN CONNECTION
 
<%
Set Con = Server.CreateObject( "ADODB.Connection" )
     Con.Open  "DSN=SERVERDB;" &_
               "Uid=TEST;"&_
               "Pwd=TEST;"
 
sqlString = ".........."
Con.Execute( sqlString )
%>
 

May you help me ?!!!!
 
server=server
database=tst
user=test
password=test
dsn=serverdb


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to