PDA

View Full Version : Asp needed for database access


suriya6in
08-07-2003, 06:22 AM
hi

Right from scratch, how do i install ASP in a server or where can i get ASP? ('cause,beginner in ASP pls!)

The need for this ASP is to display an access database in an html format. IF anyone can help in this regards also will be appreciated!!!

suriya

Roy Sinclair
08-07-2003, 06:27 AM
Install IIS on a Microsoft server and ASP will be installed too.

Install ALL of the security patches for that server before you connect it to the web.

raf
08-07-2003, 08:45 AM
Mr. Sinclair :Install ALL of the security patches for that server before you connect it to the web.
I hope you got a pretty fast internetconnection. (Last time i checked, Win 2000 Pro + IIS needed about 200 MB of patches and security packs)

suriya6in :The need for this ASP is to display an access database in an html format. IF anyone can help in this regards also will be appreciated!!!
Well, welcomme here. That's exactly our mission.
For about all you possible questions and problems, there will turn up some answers if you use the searchfunction on top of this forums.
Or you might check out http://www.w3schools.com/asp/default.asp
for some get-started tutorials

oracleguy
08-07-2003, 06:37 PM
Originally posted by raf
I hope you got a pretty fast internetconnection. (Last time i checked, Win 2000 Pro + IIS needed about 200 MB of patches and security packs)

Make sure you install SP4 first. SP4 will take care of a huge ammount since it only came out, what 2 months ago?

If it is going to be a web server it is probably on a good connection.

Morgoth
08-08-2003, 06:01 PM
Originally posted by raf
I hope you got a pretty fast internetconnection. (Last time i checked, Win 2000 Pro + IIS needed about 200 MB of patches and security packs)

You should get Windows Service Pack 4, and I think there is a few hacking patches, like for nimda, unless that comes with Service Pack 4.

And it's not too big, but it will take along time to download and install, but you can always just go get something to eat and watch a tv show or something.

suriya6in
08-09-2003, 12:57 PM
hi!

Tks for all replies. Now i have understood ASP basics!
I need explanation about displaying a ms access database in HTML format for Intranet viewing purpose in IIS.

How to do this?

suriya

raf
08-09-2003, 01:06 PM
Can you be more specific, cause it's a quite broad area ?

What exactly do you need? Connection string? Recordset handling?

ScottInTexas
08-09-2003, 04:02 PM
You should also install the personal web server on your desktop to run and test your asp before uploading to the web. In Win98 the PWS is on the CD under the folder addin. Just run setup from that folder and it will install the server.

I don't know about win2000 or xp.

Morgoth
08-09-2003, 06:24 PM
Originally posted by suriya6in
hi!

Tks for all replies. Now i have understood ASP basics!
I need explanation about displaying a ms access database in HTML format for Intranet viewing purpose in IIS.

How to do this?

suriya

Ok, this is easy.


<%
Dim oConn, StrConn, sSQL, oRS
Set oConn = Server.CreateObject("ADODB.Connection")
StrConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("database.mdb") & ";"
oConn.open StrConn

sSQL = "SELECT * FROM `table` ORDER BY id DESC"
Set oRS = oConn.Execute(sSQL)
%>
<html>
<font size="2" color="#00FF00" face="verdana">Number: <%=oRS("id")%> | <%=oRS("field")%></font><br><br>
</html>
<%
oConn.Close
%>


On your server, if you ever want to update your databases, you will need to put your database in a folder WITH PERMISSIONS!

To do this, you will need to make a folder (let's call it /db/). Inside of /db/ you will put your database.mdb. Now you need to right click the /db/ folder and go to propertise > Security and click on the word "Everyone" and select "Modify" and "Write" and check them both.

REMEMBER! when you are adding a file that you want to be on the internet in your wwwroot folder, you MUST copy and paste it, CUTTING IT will not work.

suriya6in
08-13-2003, 08:12 AM
Very thanks morgoth!!! Your explanation was really helpful.
I have a small doubt in it.

I have created the database.mdb file and stored in a folder named db. Now is this folder should be inside the www root folder?

Moreover iam going create only the shortcut for this database.mdb file in the user desktop connected to the server. so as such iam not going to transfer or copy any file.

suriya

Morgoth
08-13-2003, 11:34 AM
The database doesn't have to be in the wwwroot. Put it anywhere you want, but you can not use the 'Server.MapPath()'.
It will look like:
StrConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Z:\My Folder\dbroot\database.mdb;"

suriya6in
08-16-2003, 06:14 AM
hi morgoth,

I have done everything what you said.
But now while viewing the webpage, only the text "Number: I"
is appearing. nothing else!!!

What will be the problem?

suriya

Morgoth
08-16-2003, 07:00 AM
Please paste the _EXACT_ code you are using, and write your database table out and paste it in a reply too.

Example:

<%
...
%>


DatabaseName:
Table1
Field1 Integer
Field2 Text
Field3 Date
Table2
Field1 Integer
Field2 Integer
Field3 Text


When you do this, I will be able to help you.