PDA

View Full Version : ASP Help


lance-tek
09-02-03, 10:03 PM
I am trying to learn ASP and I have signed up at ASP.NET forums.

I posted a question and explained in full detail what I was trying to do, perhaps someone from here could answer the riddle for me.

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=327794

Thanks,

-lance

Jon
09-03-03, 05:12 AM
Just my 2 cents but,
I would suggest you do all of your table linking/joining in access and just use ASP to parse 1 table.

When I get home from work I can post some code that from a quick read will do what you want.

lance-tek
09-03-03, 06:24 PM
Sounds great to me. I have been online looking for some source to get me started and I have found this article http://www.codeproject.com/asp/accessdb.asp
I am trying to impliment it but I am not sure how to put the code I have put together into an HTML file so it can be viewed and tested.

The code is as follows:

Dim ConnectionString
ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" &_
"DBQ=sidpers.mdb;DefaultDir=;UID=;PWD=;"

Dim Connection
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.ConnectionTimeout = 90
Connection.CommandTimeout = 80
Connection.Open ConnectionString

Dim rs
set rs = Server.CreateObject("ADODB.RecordSet")

rs.Open "SELECT * FROM MyTable", Connection, adOpenForwardOnly, adLockOptimistic

Dim item
For each item in rs.Fields
Response.Write item.Name & "<br>"
next

while not rs.EOF

For each item in rs.Fields
Response.Write item.Value & "<br>"
next

rs.MoveNext
wend

End Sub

rs.Close
set rs = nothing

Connection.Close
Set Connection = nothing


it is possible that I am not fully understanding it. I am on AIM with Rick (cablenut) whom is a great help to me. But unfortunately he is away from the puter at the moment. So, I am going back to the books and internet research while I am waiting for a response from anyone in regards to this.

Thanks for helping,

-lance

Jon
09-03-03, 06:30 PM
can you email me your access database and I'll see what I can do?

lance-tek
09-03-03, 06:37 PM
I will create a mock DB really quick as I am working in the real DB and it contains info that I can not disclose. Just give me a sec and I will make a few changes in a copy of the DB.

I got your PM and I will email here in just a sec.

Thanks

-lance

lance-tek
09-15-03, 08:36 AM
hmmm, well, it looks like I am back to working with ASP so, any help would be greatly appreciated!!!!

-lance