Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   ASP (http://www.programmingforums.org/forum32.html)
-   -   SQL and ASP (http://www.programmingforums.org/showthread.php?t=10651)

paulchwd Jul 7th, 2006 10:18 AM

SQL and ASP
 
Hi,

Question...in asp you have to (as far as I no) state the location of the database you are going to use...before you start running sql commands through it....

What if i want to use sql (**note i mean the language sql no tthe server**) to create the table (create table statments) how do i do that

:

path=server.mapPath("customer.mdb")

set adocon = server.createobject("ADODB.Connection")
adocon.Provider="Microsoft.Jet.OLEDB.4.0"
adocon.Open=  path


in short i do not want to create my tables physically in access, I want to use sql (the language not the server) to create my tables

thanks

java_roshan Jul 7th, 2006 10:24 AM

If you create a blank database, in MS-access, you can issue SQL commands to create tables. i.e.
1. Create a blank database with no tables

2. Create an ASP file, including the connection code, and write create table statements. Include a subroutine to check for errors, that might creep up, if any. (make use of err.Number, err.Description, to simplify your work)

3. Use Response.Write statements, if there are no errors, to display, "Successfully created a table"

and yes, use Mozilla Firefox :)

paulchwd Sep 29th, 2006 3:25 PM

thanks.. wil try

java_roshan Oct 1st, 2006 9:09 AM

Quote:

Originally Posted by paulchwd (Post 115312)
thanks.. wil try

Almost two months later, this thread is evoked!
I hope, my reply helps.


All times are GMT -5. The time now is 9:19 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC