erot
asked on
ODBC-DataSourceAdm...ASP and SQLserver7.0
Have installed MS SqlServer7.0 Beta 3
Want to test how to access data in an Sql database with
ASP-scripts.
Have already made a testapplication using
FrontPage (ASP), Access97 and VBScript...everything
works fine within this appl.
I want to do the following:
- Create a database in MS Sql 7.0 similar to the
previously created database in Access97.
This is done.
- Set up the nessesary settings in the ODBC Data Source
Manager in Control panel so I can access the
database.
How do I do this??????
- How do I access this database from within ASP ??????
I use a stand alone PC, and windows95.
Want to test how to access data in an Sql database with
ASP-scripts.
Have already made a testapplication using
FrontPage (ASP), Access97 and VBScript...everything
works fine within this appl.
I want to do the following:
- Create a database in MS Sql 7.0 similar to the
previously created database in Access97.
This is done.
- Set up the nessesary settings in the ODBC Data Source
Manager in Control panel so I can access the
database.
How do I do this??????
- How do I access this database from within ASP ??????
I use a stand alone PC, and windows95.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
most ASP applications have a file called "global.asa", which sets global variables. The file must be in the root of the application.
ASKER
Could not find any info on "global.asa".
Tried to do the following which works fine when accessing an
access database:
set conn = Server.CreateObject("ADODB .Connectio n")
conn.open "DSN=Tore", "", ""
set rs = server.CreateObject("ADODB .recordset ")
strSql = "Select FirstName from Person"
rs.open strSql, conn, 3, 3
have also tried different versions with the conn.open:
conn.open "DSN=Tore", "UID=sa", ""
conn.open "DSN=Tore", "UID=sa", "PWD="
should it not be possible to do it this way????
Tried to do the following which works fine when accessing an
access database:
set conn = Server.CreateObject("ADODB
conn.open "DSN=Tore", "", ""
set rs = server.CreateObject("ADODB
strSql = "Select FirstName from Person"
rs.open strSql, conn, 3, 3
have also tried different versions with the conn.open:
conn.open "DSN=Tore", "UID=sa", ""
conn.open "DSN=Tore", "UID=sa", "PWD="
should it not be possible to do it this way????
ASKER
Forgot to tell you that the code above give no errors.
ASKER
Found out how it works....
conn.open "DSN=NameOfDsn;UID=sa;PWD= " works well.
Thank you..
Erot/Norway
conn.open "DSN=NameOfDsn;UID=sa;PWD=
Thank you..
Erot/Norway
ASKER
pnt. one worked out well.
Erot/Norway