Hi,
I'm relatively new to asp. I'm trying to build a dynamic website that will display available stock info to our customers, however, I seem not to be getting anywhere.
I have got a Microsoft Access Database, on a stand-alone machine....and I have tried the following code....but when I try the page, it's not displaying what I wnat. Looks like I have problems with my connection string.
<%@LANGUAGE="vbscript" %>
<%
Option Explicit
Dim MyConn, MyDB
Dim rs
Dim sql
Set MyConn=server.createobject ("ADODB.connection")
myDb= "Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\Test\AvStockasp.mdb"
MyConn.open myDb
set rs = server.createobject("ADODB.Recordset")
%>
<HTML>
<body bgcolor="#FFFFFF" TEXT="#000000">
<p align="centre"><Font face="Times New Roman, Times, Serif" size="4">Available Stock View
</Font></p>
<div align="centre">
<centre>
<%
sql="Select * from Available_Stock"
rs.open sql, MyConn,1,1
rs.movefirst
do until rs.eof
%>
Item: <%=rs("Description")%>
<br>
<%
rs.movefirst
Loop
rs.close
%>
</centre>
</div>
</form>
</body>
</html>
Many thanks for your help.
Thanks and regards,
Francis
I'm relatively new to asp. I'm trying to build a dynamic website that will display available stock info to our customers, however, I seem not to be getting anywhere.
I have got a Microsoft Access Database, on a stand-alone machine....and I have tried the following code....but when I try the page, it's not displaying what I wnat. Looks like I have problems with my connection string.
<%@LANGUAGE="vbscript" %>
<%
Option Explicit
Dim MyConn, MyDB
Dim rs
Dim sql
Set MyConn=server.createobject ("ADODB.connection")
myDb= "Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\Test\AvStockasp.mdb"
MyConn.open myDb
set rs = server.createobject("ADODB.Recordset")
%>
<HTML>
<body bgcolor="#FFFFFF" TEXT="#000000">
<p align="centre"><Font face="Times New Roman, Times, Serif" size="4">Available Stock View
</Font></p>
<div align="centre">
<centre>
<%
sql="Select * from Available_Stock"
rs.open sql, MyConn,1,1
rs.movefirst
do until rs.eof
%>
Item: <%=rs("Description")%>
<br>
<%
rs.movefirst
Loop
rs.close
%>
</centre>
</div>
</form>
</body>
</html>
Many thanks for your help.
Thanks and regards,
Francis