0

Hey guys!

I was wondering if anyone could help me. I am a student on my work placement year and I am developing a web based database. I have been asked to design it so users can if need be add a new table to the database or add a new column to an existing table. I have never done this before, how would I go about doing this?? I was thinking that I would have to use some kind of stored procedure and a form the users could fill in? but I have no idea where to start.

I am using Dreamweaver MX and Access, I will be using SQL Server but I am using Access at the minute to create a practice dummy site.

Thanks!
Any ideas would be greatly appreciated!

GLT

2
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by pmpn
0

anyone any ideas?? really need to know how to do this!

Any ideas would be great!

Thanks
GLT

0

you may need give interface for users to enter table name, field names, field types etc
then when they submit you need to construct SQL code like
Create Table tblTest
Add iIDNumber int null
etc like that

please refer Transact SQL for more info on create table syntax.

then you execute that in ASP code to create tables/fields

0

you may need give interface for users to enter table name, field names, field types etc
then when they submit you need to construct SQL code like
Create Table tblTest
Add iIDNumber int null
etc like that

please refer Transact SQL for more info on create table syntax.

then you execute that in ASP code to create tables/fields

Thank you for getting back to me!
I do know the SQL for creating a table but how would I go about coding ASP to create the table? I am a bit confused of how to link it all together.

Thanks GLT

0

below code connects sql server & execute create table SQL query. may be it will be useful to understand.

'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")

'open the connection to the database
Connection.Open "Server=server_name;UID=user_name;PWD=password;Database=database_name"

sSQL = "create table .."
Connection.execute(sSQL)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.