Ask a Question related to ASP Database, Design and Development.
-
Steve #1
Connect to Access 20002 on local computer
Here's the code I'm trying to use; basic ASP code and it just reads the
records in the database: I want to use it on my local computer where this
file "ReadRecords.asp" and the "calgarywebconcepts.mdb" file are both in the
Inventory directory. I'm using Access 2002 and my problem seems to be in how
I'm trying to connect to the database (the first 13 lines). Can anyone see a
problem with this?
Thanks... Steve
<!--#include file="adovbs.inc"-->
<%
dim strconn
dim rs
dim conn
strconn="Provider=Microsoft.Het.OLEBD.3.51; Data
Source=C:\Inventory\calgarywebconcepts.mdb"
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "strconn"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Inventory", conn, adOpenStatic, adLockOptimistic, adCmdTable
Response.Write "<TABLE BORDER=""1"" CELLSPACING=""2"" CELLPADDING=""2"">" &
vbCrLf
Response.Write vbTab & "<TR>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>Department</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>ItemNo</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>ItemName</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>Description</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>Price</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>Quantity</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>DateAdded</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>DateSold</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>DateTransferred</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>DateReturned</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>PictureSmall</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>PictureLarge</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>Color</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>Size</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>Special</B></TD>" & vbCrLf
Response.Write vbTab & vbTab & "<TD><B>Discount</B></TD>" & vbCrLf
Response.Write vbTab & "</TR>" & vbCrLf
If Not rs.EOF Then
rs.MoveFirst
'Show data
Do While Not rs.EOF
Response.Write vbTab & "<TR>" & vbCrLf
For I = 0 To rs.Fields.Count - 1
Response.Write vbTab & vbTab & "<TD>" & rs.Fields(I) & "</TD>" & vbCrLf
Next
Response.Write vbTab & "</TR>" & vbCrLf
rs.MoveNext
Loop
End If
Response.Write "</TABLE>" & vbCrLf
rs.Close
set rs=nothing 'Close Recordset Object
conn.Close
Set conn=Nothing 'Delete connection Object
%>
<html>
<head>
<title>ReadRecords.asp</title>
</head>
<body BACKGROUND="images/bkg_white.jpg">
</body>
</html>
Steve Guest
-
Publish To Local Computer
Please excuse my ignorance, but I would like to know how I can send or publish the files for a flashpaper document in my web page to my home/local... -
How can I setup SSL on my LOCAL COMPUTER?
Hello, I already have setup SSL on my production server via purchasing a certificate and that seems to work fine as I can type in https:// and it... -
Connecting to Access 2002 on local computer
I don't know if I'm in the right newsgroup... but here goes. Here's the code I'm trying to use; basic ASP code and it just reads the records in... -
How to test Webservice on Web like on local computer?
Hi, All I created a Webservice locally, and it returns all coustomers names in XML format when I click "Invoke" button. But when I test from the... -
Access entire desktop computer from laptop computer on wireless network
When I try to set up a network place on my laptop, I browse the locations that I want to setup in the network place set-up wizard but it wont let... -
Ray at #2
Re: Connect to Access 20002 on local computer
Are you getting an error? If so, what is it, and on what line?
Look at your connection string. Provider=Microsoft.___H___et...
Try this connection string: (Notice Jet 4.0, also)
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inventory\calgarywebconcepts.mdb;"
Ray at home
"Steve" <somers12@shaw.ca> wrote in message
news:dZeec.79434$Ig.3472@pd7tw2no...the> Here's the code I'm trying to use; basic ASP code and it just reads the
> records in the database: I want to use it on my local computer where this
> file "ReadRecords.asp" and the "calgarywebconcepts.mdb" file are both inhow> Inventory directory. I'm using Access 2002 and my problem seems to be ina> I'm trying to connect to the database (the first 13 lines). Can anyone see> problem with this?
>
> Thanks... Steve
>
> <!--#include file="adovbs.inc"-->
> <%
> dim strconn
> dim rs
> dim conn
> strconn="Provider=Microsoft.Het.OLEBD.3.51; Data
> Source=C:\Inventory\calgarywebconcepts.mdb"
>
Ray at Guest
-
Bullschmidt #3
Re: Connect to Access 20002 on local computer
Or perhaps create a DSN and let the connection string just be the name
of the DSN.
Best regards,
J. Paul Schmidt, Freelance ASP Web Consultant
[url]http://www.Bullschmidt.com[/url]
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Bullschmidt Guest
-
Ray at #4
Re: Connect to Access 20002 on local computer
Don't use a DSN, as it will be an old technology ODBC connection then.
Ray at home
"Bullschmidt" <paul@bullschmidt.com-nospam> wrote in message
news:OxJQ6mcJEHA.2432@TK2MSFTNGP10.phx.gbl...> Or perhaps create a DSN and let the connection string just be the name
> of the DSN.
>
> Best regards,
> J. Paul Schmidt, Freelance ASP Web Consultant
> [url]http://www.Bullschmidt.com[/url]
> ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Ray at Guest



Reply With Quote

