|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
ASP n00b - help getting started
Hello Developers,
I'm usually a php guy, but I've been called upon to take up an asp project at my school and I need a little direction. I'm hoping someone could reccomend a good book to me, or point me to some good online tutorials. What I'm most interested in is figuring out is making some html forms and an Access database play happily together. Thanks! |
|
#2
|
|||
|
|||
|
---BEGIN QUOTE---
I'm usually a php guy ---END QUOTE--- So you should have any problems building HTML forms right? That part I'm sure you know how, with your PHP background obviously! The Access database, then yes that's different The first thing you might want to test, is a simple .asp page that connects to your Access database. Something like: <% Dim strSql Dim objConn Dim objRst strSql = "SELECT Field1, Field2 FROM Table" Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open YOUR_CONNECTION_STRING Set objRst = objConn.Execute strSql If objRst.EOF Then Response.Write "No data found" Else While NOT objRst.EOF Response.WRite "-->" & objRst("Field1") & "<--<br>" Response.WRite "-->" & objRst("Field2") & "<--<hr>" objRst.MoveNext Wend End If 'Closing and freeing recordset and connection object objRst.Close Set objRst = nothing objConn.Close Set objConn = nothing %> <HTML> <BODY> </BODY> </HTML> ------------------------------------------------------------------- Read on the CONNECTION STRING on searcrhing google.com Or check out tutorials at w3school or something I don't remember... This simple example, connects to your database(YOUR_CONNECTION_STRING) and executes an SQL Query(strSql) It then check to see if it has reached EOF(End Of File) If it did, it write a message to the screen(browser) If it has NOT reached EOF, then loop with the recordser(objRst) until you've reached EOF. As your looping, print the records(Field1 and Field2) Hope this helps! Sincerely Vlince |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ASP n00b - help getting started |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|