It's must be possible depending on what RDBMS you use. In SQLServer there are Sytems tables which you can look into for database schema issues (Tables exists or not, columns, etc.)
Now for the creation of the database, you'd have to have a connection to the Master Database (basically the system database holding the information for the client database.) You could probably do an insert in the System table where the "user" databases are defined and that would probably create a new database. Then with CFs undocumented tags and fucnction you could setup the connection to that new database, then load the Tables and data. I have already accomplished the creation of DSNs, tables and columns with CF and SQL server, so I'm sure that part can be done. The other one, creating a database, might be a bit tricky, I suggest you look in the documentation of your RDBMS under System Tables. Good luck and keep us posted, seems pretty interesting. Marc Campeau > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of Michel Rouse > Sent: Thursday, March 21, 2002 12:21 PM > To: Toronto CFUG > Subject: [CFTALKTor] Databases > > > I'm not sure if this is even possible (although I imagine it is) > > I would like to be able to check if a database exists, if not, create > it. Then, check if a table exists in that database, if not, create it. > Then check if a column exists in that table, if yes, insert data into > it, if not, create it then insert data into it. > > Any help would be much appreciated. > > Michel > > -- > "Put your hand on a hot stove for a minute, and it seems like > an hour. Sit with a pretty girl for an hour, and it seems like > a minute. That's relativity." > > -- Einstein, Albert > _______________________ > > Michel Anthony Rouse > Webmaster > Steltor > > 2000 Peel street, 4th floor > Montreal, Quebec > H3A 2W5 > Canada > > tel: +1 (514) 733-8500 x-5001 > fax: +1 (514) 733-8878 > [EMAIL PROTECTED] > www.steltor.com > > Toll free in North America: 1-800-675-2991 > > > - > You are subscribed to the CFUGToronto CFTALK ListSRV. > This message has been posted by: Michel Rouse <[EMAIL PROTECTED]> > To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/ > Manager: Kevin Towes ([EMAIL PROTECTED]) > http://www.CFUGToronto.org/ > This System has been donated by Infopreneur, Inc. > (http://www.infopreneur.net) > > - You are subscribed to the CFUGToronto CFTALK ListSRV. This message has been posted by: "Marc Campeau" <[EMAIL PROTECTED]> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/ Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/ This System has been donated by Infopreneur, Inc. (http://www.infopreneur.net)
