ASP Resources - Help
#1
Scooby Regular
Thread Starter
Having a real good go at the moment at my first ASP pages and linking them into MS Access.
The language and syntax is surprisingly easy and I have already created some secure login pages, and pages which list the database items on a nice looking web page. However, I am struggling to INSERT to the DB.
I have a web page complete with form which the data is entered into, and the action points to process_page.asp, which should take the Request.form (method=POST) and INSERT it to the DB. Script is along the lines of:
Conn = Connection syntax (usual connection stuff)
SQL= "INSERT INTO table(field,field) VALUES () etc etc
Conn.execute(SQL)
However it says there is a Data type mismatch in the Conn.execute line.
Are there any superb websites anywhere for ASP/Server side scripting?
DW
The language and syntax is surprisingly easy and I have already created some secure login pages, and pages which list the database items on a nice looking web page. However, I am struggling to INSERT to the DB.
I have a web page complete with form which the data is entered into, and the action points to process_page.asp, which should take the Request.form (method=POST) and INSERT it to the DB. Script is along the lines of:
Conn = Connection syntax (usual connection stuff)
SQL= "INSERT INTO table(field,field) VALUES () etc etc
Conn.execute(SQL)
However it says there is a Data type mismatch in the Conn.execute line.
Are there any superb websites anywhere for ASP/Server side scripting?
DW
#2
DON'T DO IT!!!
I also made the mistake of trying ASP before I discovered the joys of PHP. ASP is needlessly complicated compared to PHP, and also MS Access is deeply naff - slow and clunky when used online. I beg you, don't fall into the Microsoft trap; PHP runs faster and is a much easier language to use. There is also a fantastic reference site for PHP here that covers all functions etc. I never found any ASP sites as good as this.
Anyway, just my experience... if you do give PHP a try, I would be happy to help with any queries you have.
I also made the mistake of trying ASP before I discovered the joys of PHP. ASP is needlessly complicated compared to PHP, and also MS Access is deeply naff - slow and clunky when used online. I beg you, don't fall into the Microsoft trap; PHP runs faster and is a much easier language to use. There is also a fantastic reference site for PHP here that covers all functions etc. I never found any ASP sites as good as this.
Anyway, just my experience... if you do give PHP a try, I would be happy to help with any queries you have.
#3
Scooby Regular
Thread Starter
Cheers Pete, however it is just for a small project where say 8 records a week may need to be altered at the most.
Seen as though I have Access and PWS here it makes sense to use them, rather than have to learn a new language and a new DB.
I will still have a go with PHP though - always good to learn more stuff.
DW
Seen as though I have Access and PWS here it makes sense to use them, rather than have to learn a new language and a new DB.
I will still have a go with PHP though - always good to learn more stuff.
DW
#5
www.4guysfromrolla.com
ASP / PHP - horses for courses.
Access is fine to learn with - eg. if you site gets no more than 20 concurrent connections at a time. Beyond that, move to MySQL, Oracle, SQL Server, etc...
Cold Fusion is another popular choice.
Make sure whoever is hosting your site can offer you these services though. Try Lee at www.siwd.co.uk - he's excellent.
-DV
[Edited by DazV - 1/25/2002 7:43:59 PM]
ASP / PHP - horses for courses.
Access is fine to learn with - eg. if you site gets no more than 20 concurrent connections at a time. Beyond that, move to MySQL, Oracle, SQL Server, etc...
Cold Fusion is another popular choice.
Make sure whoever is hosting your site can offer you these services though. Try Lee at www.siwd.co.uk - he's excellent.
-DV
[Edited by DazV - 1/25/2002 7:43:59 PM]
Trending Topics
#8
Back online - long story. Will post tomorrow. 2 days of hell relating to blue-screens-of-death.
Oops, seem to have posted in wrong thread - sorreee
[Edited by DazV - 1/26/2002 11:06:40 PM]
Oops, seem to have posted in wrong thread - sorreee
[Edited by DazV - 1/26/2002 11:06:40 PM]
#9
Scooby Regular
Join Date: Nov 2000
Location: Glasgow
Posts: 1,432
Likes: 0
Received 0 Likes
on
0 Posts
Download Macromedia Ultradev, if you know Dreamweaver you will pick up ultradev very quickley. It also has good tutorials on linking Databases and has a password form built in.
Cheers
Jeremy
Cheers
Jeremy
#10
Ultradev is all very well and lets you knock things up quickly but it writes awful code!
You really wouldn't want to put it into a production environment as it holds the db open for the entire page and loops recordsets in an inefficient way. Plus trying to modify the code is an absolute nightmare (I know, I've tried to modify a site someone did in Ultradev - found it was quicker to rewrite from scratch!).
Its probably easiest to use ADO to access the database from ASP, it should work fine and be reliable too.
Any questions, feel free to ask....
You really wouldn't want to put it into a production environment as it holds the db open for the entire page and loops recordsets in an inefficient way. Plus trying to modify the code is an absolute nightmare (I know, I've tried to modify a site someone did in Ultradev - found it was quicker to rewrite from scratch!).
Its probably easiest to use ADO to access the database from ASP, it should work fine and be reliable too.
Any questions, feel free to ask....
#11
Scooby Regular
Thread Starter
Thanks all, well I have managed it and am very proud of the fact that 2 days ago I had never written a line of ASP, and now I have a full online admin system for the website owner.
I have managed to create a database of records, which can be added to, amended or deleted. Once I got the hang of writing in hidden fields/text fields to hold the variables, and passing the correct variables through to the process pages it was fine. I have even managed to streamline the processes. At first I had a process page for add, amend and delete for each table. Using hidden fields my processes now determine which table we are adding/amending/deleting from/to. Very happy.
Now just need to link the DB into the actual web pages, but it should be easy enough after creating the admin section. Just a case of selecting the info and displaying the record sets on the page.
Maybe time to move towards PHP/MySql now. I presume these are better for large scale e-commerce websites? How do you program a Oracle or MySql database? i.e. for MS you use Access, so what do you use for Oracle, or MySql?
DW
I have managed to create a database of records, which can be added to, amended or deleted. Once I got the hang of writing in hidden fields/text fields to hold the variables, and passing the correct variables through to the process pages it was fine. I have even managed to streamline the processes. At first I had a process page for add, amend and delete for each table. Using hidden fields my processes now determine which table we are adding/amending/deleting from/to. Very happy.
Now just need to link the DB into the actual web pages, but it should be easy enough after creating the admin section. Just a case of selecting the info and displaying the record sets on the page.
Maybe time to move towards PHP/MySql now. I presume these are better for large scale e-commerce websites? How do you program a Oracle or MySql database? i.e. for MS you use Access, so what do you use for Oracle, or MySql?
DW
#13
DreamWeaver,
Regardless of what server-side scripting language your're using, eg. ASP, PHP, you communicate with the database, be it Access, MySQL, etc... using standard SQL commands (pronounced "sequel")
I assume you've already done this by constructing some kind of SQL string with your ASP code, to talk to your Access database.
You should be able to install MySQL, setup a database with it, setup an ODBC source and talk to it using very similar code to what you've written.
Get yourself a good book on ASP / ADO
http://www.amazon.co.uk/exec/obidos/...712530-2412456
Get yourself a good book on the SQL command set too - lots of them.
-DV
PS: I've got a spare reference book on ASP, which costs £45 - huge book, which you can have for £20 if you want.
http://www.amazon.co.uk/exec/obidos/...712530-2412456
[Edited by DazV - 1/29/2002 2:35:54 PM]
Regardless of what server-side scripting language your're using, eg. ASP, PHP, you communicate with the database, be it Access, MySQL, etc... using standard SQL commands (pronounced "sequel")
I assume you've already done this by constructing some kind of SQL string with your ASP code, to talk to your Access database.
You should be able to install MySQL, setup a database with it, setup an ODBC source and talk to it using very similar code to what you've written.
Get yourself a good book on ASP / ADO
http://www.amazon.co.uk/exec/obidos/...712530-2412456
Get yourself a good book on the SQL command set too - lots of them.
-DV
PS: I've got a spare reference book on ASP, which costs £45 - huge book, which you can have for £20 if you want.
http://www.amazon.co.uk/exec/obidos/...712530-2412456
[Edited by DazV - 1/29/2002 2:35:54 PM]
Thread
Thread Starter
Forum
Replies
Last Post
sKunk
ScoobyNet General
3
20 September 2001 09:34 PM