Click to See Complete Forum and Search --> : ASP and data base


aliabbas
06-28-2003, 09:53 AM
Ciao From Montpellier (France)

I have a serious problem with ASP.

I would like to create a table in a date base via ASP

Can you tell me if it's posible ?
And if yes

how will do it ?

Thank you

Ali

aliabbas
06-28-2003, 01:56 PM
This an Ms Access on a sql server
I use this code for my connection :

site.asp

<% option explicit
dim db_dataprovider, db_datasource, db_initialcatalog, db_userid, db_password
db_dataprovider = "SQLOLEDB"
db_datasource = "xxxxx.webdez.com"
db_initialcatalog = " "
db_userid = " "
db_password = " "

dim db_connection

' Code de connection

function db_connect
Set db_connection = Server.CreateObject("ADODB.Connection")
db_connection.CommandTimeout = 30
db_connection.ConnectionTimeout = 20
db_connection.ConnectionString = "Provider=" & db_dataprovider & "; Data Source=" & db_datasource & ";Initial Catalog=" & db_initialcatalog & "; User ID=" & db_userid & "; Password=" & db_password
db_connection.Open
end function ' db_connect

' Code de deconnection

function db_disconnect
db_connection.close
set db_connection = nothing
end function ' db_disconnect
%>


And I would like to create a table on !!!

Thanks

Bullschmidt
07-01-2003, 10:20 PM
Also you may want to check out the following:

Working with ADOX by Ramesh Balaji and Scott Mitchell - 1/31/2001
http://www.4guysfromrolla.com/webtech/013101-1.shtml

gil davis
07-04-2003, 06:10 PM
Originally posted by Bullschmidt
Also you may want to check out the following:

Working with ADOX by Ramesh Balaji and Scott Mitchell - 1/31/2001
http://www.4guysfromrolla.com/webtech/013101-1.shtml I tried their example on my newly created W98 PWS, and I got this error:ADOX.Tables error '800a0bb9'
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
/test/create_db.asp, line 20
Being a total ASP noob, I expect I have a configuration problem, but don't really know where to start.

Bullschmidt
07-04-2003, 06:30 PM
Here are some more ADOX resources that hopefully may help somehow:

ADOX API Reference
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/adoddlo1.asp

Ease Data Access With ADOX
Use the new ADO object library to build and inspect your database structure
by Jeffrey P. McManus
http://archive.devx.com/upload/free/features/vbpj/1999/06jun99/jm0699/jm0699.asp

Add tables with ADOX
http://nuts4asp.com/tutorials/adox

ADOX FAQ
http://www.able-consulting.com/ADOX_Faq.htm