English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to make search in a table. Can I write the search command in an asp file. I havent formed the table yet. Which database program should I use to form the table?

2006-11-23 04:33:52 · 2 answers · asked by x_squared 4 in Computers & Internet Programming & Design

2 answers

You most certainly can! First is first, you can create the table in the database software of your choice. You could use SQL Server, MySQL, Oracle etc. The general syntax for making a table is usually pretty standard as it fits to ANSI SQL standards.

Now to create an SQL statement in asp you just need to build the string, then establish a connection object and execute. For instance (the below example is for connecting to microsoft access)...

dim objCon
set objCon = Server.CreateObject( "ADODB.connection" )

objCon.Open "Provider= Microsoft.Jet.OLEDB.4.0;
data source= c:/webdata/northwind.mdb;
userID= xxx;
password=yyy"

Then use the execute statement to run your SQL...

dim rs
set rs = Server.CreateObject( "ADODB.recordset" )
set rs = objCon.execute( "select accountname from accounts" )

Now the rs recordset will contain your records for you iterate through. I have provided some useful sites that can help you get started. Hope they work out for you!

Enjoy!

2006-11-23 08:30:03 · answer #1 · answered by Martyr2 7 · 1 0

you need to use sq. Server floor section Configuration gadget which could be modern-day in initiate Menu sq. Server Configuration section. by default sq. 2005 certainly refuses distant connections and you may desire to run this application to enable distant connections. The humorous element is that that's a server and this could not be by default settings. I propose, who does not prefer to get admission to the Server remotely?

2016-10-04 07:06:26 · answer #2 · answered by catherine 4 · 0 0

fedest.com, questions and answers