Don't forget that DSN should be created as System DSN...

-----Mensagem original-----
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Em nome de
[EMAIL PROTECTED]
Enviada em: Tuesday, November 19, 2002 12:45 PM
Para: ing. fabio freddi
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: Re: problem odbc connection


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


---
E-Mail recebido est� sem virus.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002

Attachment: smime.p7s
Description: application/pkcs7-signature

Reply via email to