Forum Moderators: open
I need to create an ASP page with a MS Access ( don't ask =\ ) backend database..
I basically need to fill the database with various info and then display it out in tables on an HTML page
It has to be a DNS-less connection to the database (db will reside local to the ASP pages)
A table will 7 colums with Date create, user posted, rank#, etc... at the top, then a Subject row.. and then a Description below that.
I also need to build an Admin web interfact with several admin ids/passwords that will be able to Add/Edit/Remove new data..
This whole site can be very simple as long as it works
Now a little about my experience.. I'm not a developer or programmer.. i'm a designer..
But, i've been using PHP/Perl scripts for a long time with MySQL backend..
I can install them, modify to my needs, and run on windows/*nix servers.. run mysql queries, etc..
But i've never used asp or even created an ms access db before..
Tried searching on the web for tutorials and reading a big fat book on creating websites with db's, but it wasn't that great.. no examples, just overviews
So, i'm asking for any help I can get.. even if it's just a link on some peace of info that'll help me
Thank you in Advance
Dreamweaver Ultradev or Dreamweaver MX is in my opinion, the easiest way to author for ASP/Access. Set up your DSNless & point-&-click your way through most of what you need to do.
With your PHP background, and DW's point-&-click insertion of VBscript, you'll feel comfortable massaging script in code view in a few days.
break your task down into pieces. then look up a tutorial on the internet for each task. being an asp developer, i almost guarantee you can find a tutorial about every step you get to in your project.
i.e.
-Creating a DSN-less connection with ASP
-Retrieving records from an Access Database with ASP
-Displaying records on a webpage with ASP
... and so on.
-Matt
'Access connection code
DataConn.Open "DBQ=" & Server.MapPath("newdb.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20;", "username", "password"
Any tips on that?
Also, thanks for the suggestions mattglet.. that's basically what i'm trying to do at this time.. going through all the examples, i've got a working copy now, trying trying to modify it to my needs.. having some issues.. hopefully a matter of time.
And defanjos, thanks for the link.. it looks excellent.. i'm defenatly going to go through that site see what i can dig up :)
Creating a DSN-less connection
You can use a DSN-less connection to create an ODBC or OLE DB connection between your web application and your database.You use a connection string to create the connection. A connection string combines all the information your web application needs on the server to connect to a database. Dreamweaver inserts this string in your page’s server-side scripts for later processing by your application server.
Here’s an example of a connection string:
Driver={Microsoft Access Driver (*.mdb)};
DBQ=C:\Inetpub\wwwroot\Academy\curriculum.mdb
I got an Access DB up and running and an ASP page pulling data to the web from it.. i have each row going to a separate table and some sorting options..
All the Tables are showing all of my fields, including the ID field.. 1 - 10.. how do I hide this column from showing up on the web?
Also, my first field is an Icon field.. for icons like New, Update, Hot topic, etc.. can I hide just the NAME of that column at the top?
Thanks again!
Select all cells & insert a repeat region ('Application' tab, 'Server Behaviors', 'Repeat Region') for how many records you want displayed.
<%
db = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=whatever.mdb"
set rs = server.createobject("adodb.recordset")
sql = "select * from table"
sql = sql & " where Field1 = '" & Value1 & "'"
rs.open sql, db
if not rs.eof then
do while not rs.eof
response.write rs("field1") & "<br>"
response.write rs("field2") & "<br>"
response.write rs("field3") & "<br>"
rs.movenext
loop
end if
rs.close
set rs = nothing
%>
I'm trying to add a RecordSet in 'Application' tab, 'Bindings'.. I've created a site, chose document type, created test site, but that line doesn't have a check next to it, eventhough i did it.. i can expand my DB, see the table and all the fields in there..
but when i try to click + to add a recordset, it's grayed out.. any ideas?
I've created a site, chose document type, created test sitebut when i try to click + to add a recordset, it's grayed out.. any ideas?
MX bugginess. Ultradev let you create a recordset whenever, MX well...
I get around this by:
Right-clicking & "copy" -ing then "paste" -ing a recordset from an existing successful recordset/site/page into the greyed-out application recordset panel, then change the SQL statement by 2-clicking on the pasted recordset.
or if you don't have that:
Convince MX that you have the correct 'testing server' a bizillon times, then the greyed-out will automagically become active--seems like MX likes a remote testing server to hack out the grey '+' sign.
I've been using Ultradev for a couple of years now, find it a godsend using the wizzards to create the connections.
I find the easiest thing is to do all your work locally using Personal Web Server WITH a DNS connection. Once you've finished all your work and tested it on your localhost, just go into the HTML inspector and change the connection string eg:
----------------------------
MyRecordset.ActiveConnection = "DBQ=" & Server.Mappath("myaccess.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
----------------------------
You should then be able to simply upload these pages to your web server.