Riku
Programmer
- Sep 2, 2001
- 119
I am using Access 97 database on a server that has asp and ADO support.
I created DSN database connection using FrontPage but my ASP connection don't work.
This is my code:
<body>
<%
Dim Con
Dim RS
'Sets your connection, I used a system DSN in this example
set Con = server.createobject("ADODB.Connection"
Con.open "FILEDSN=persondatabase"
'Name of your DSN
'Con = "persondatabase"
'Sets the RecordSet
Set RS = Server.CreateObject("ADODB.Recordset"
'Your SQL string, this will generate the
' Defining the SQL string
SQLString = "SELECT name FROM persons"
'Open it all up
RS.Open SQLString,Con
%>
First name: <%=RS ("name"%>
</body>
F: Riku Tuominen
riku.tuominen@benchmarking.fi
I created DSN database connection using FrontPage but my ASP connection don't work.
This is my code:
<body>
<%
Dim Con
Dim RS
'Sets your connection, I used a system DSN in this example
set Con = server.createobject("ADODB.Connection"
Con.open "FILEDSN=persondatabase"
'Name of your DSN
'Con = "persondatabase"
'Sets the RecordSet
Set RS = Server.CreateObject("ADODB.Recordset"
'Your SQL string, this will generate the
' Defining the SQL string
SQLString = "SELECT name FROM persons"
'Open it all up
RS.Open SQLString,Con
%>
First name: <%=RS ("name"%>
</body>
F: Riku Tuominen
riku.tuominen@benchmarking.fi