where does this script go! (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


seth -> where does this script go! (9/29/2001 23:40:00)

I found this code on how to connect to a database via a DSN-Less connection.
What do i do with the code?:
Dim oConn, sConnString
Set oConn = Server.CreateObject("ADODB.Connection")
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("\MemberName\db\dbname.mdb") & ";"
oConn.Open(sConnString)

and it tells me i can also define a SQL statement and execute it:
sql = "select * from myTable"
Set RS = Conn.Execute(sql)

Where does this sql statement go?





Spooky -> RE: where does this script go! (9/29/2001 13:21:00)

Not sure what you mean?
The SQL statement stays where it is and gets executed by the code

Or :
Set RS = Conn.Execute("select * from myTable")





seth -> RE: where does this script go! (9/29/2001 13:32:00)

i want to put these codes in my form, how do i do that, and what do they replace?




Spooky -> RE: where does this script go! (9/29/2001 16:17:00)

Explain a little more what you want to do?
That is a partial script for displaying the contents of a database.

You want to do what with it?





seth -> RE: where does this script go! (9/29/2001 16:24:00)

i thought i this script could help on a site, with fp extensions instaled, so i could run a database w\o giving a dsn name to the host.




Spooky -> RE: where does this script go! (9/29/2001 23:34:00)

By default, FP 2000 does not use DSN connections, it uses a connection that infact is very similar to that script already - calles DSN'less

You DONT need to have the host set up a DSN in 90% of all cases.

a) they charge for it
b) You dont need DSN
c) DSN'less is faster

Will you be using the DRW to display the database?

------------------
§þððk¥
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!
VP-ASP Shopping cart





lu lu -> RE: where does this script go! (9/30/2001 20:02:00)

thanks you info was helpful, i don't know about using the DRW to display the database, i haven't look into that aspect yet. What i know is that, i want to email the results as well as enter them into the database (cdonts, from what i've researched) and i want to call the info into a pre-made template by taking the record from db that matches the name i type in the form page, then putting those details in the form text field in the next page so i can print it (i've also researched this).
Would/should i use the drw?




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625