|
|
 |
RE: FN-FORUM A Database/internet question
date posted 12th January 2001 10:14
Darren,
ASP/Interdev can be a good approach or even UltraDev. I personally use
hand-coding to do the asp as it allows more control over what you are doing
and understand immediately where fauklts are. However, for doing the
searches it does depend upon what you are searching for.
You can create a recordset using the following:
recordset=Server.CreateObject("ADODB.Recordset")
You could then create the search string to the database:
strsql="Select * FROM youtable WHERE yourfield='yourrequirement'" etc.
You would also have to have a connection from the recordset to the database.
This can be done through odbc layers of connection strings. I prefer to use
connection strings. An example would be:
dim database
dim username
dim password
database="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=""your path followed
by the db.mdb file"";"
username="admin"
password=""
The in order to open up the connection I use:
set connection=Server.CreateObject("ADODB.Connection")
connection.CommandTimeout=30
connection.ConnectionTimeout=20
connection.Open database, username, password
And then finally - put it all together to open the recordset to get to the
database fields as done by the sqlstr field:
recordset.Open strsql, connection
There are also a number of lock types etc that can help with the way the
information is retrieved.
I hope this goes someway to helping you. If not - I apologise and I tried!
Stephen Parker
Contact Information:
***************************************
Orbinternet - New Media Design
Tel: 07899 978696
Email: [EMAIL REMOVED]
Web: http://www.orbinternet.com
Address: 3 Prospect Bank, Wetherby,
Leeds, LS23 6RS
Comp Pro Ltd trading as Orbinternet
***************************************
|
 |
|