I want to create an database in microsoft access through cold fusion program.If it is possible pls tell me how to create? and how to delete? a database using cold fusion.
i don't think that you are actually going to be able to create a database (.mdb file) by using Coldfusion alone.
i rememebr reading that someone had used cfobject to run microsoft classes that are installed with Access, to create the mdb file. Can't rememeber off the top of my head where i read this but will look around and see what i can find.
If you mean how do you create/delete a database table in access using coldfusion that is quite simple.
first you will need to create a datasource to a database on your server. lets call it dbSource
then make a coldfusion file that has got the following code in it
<!--- to create a table --->
<!--- put the field names and types (int, text etc) in the brackets below --->
<CFQUERY DATASOURCE="dbsource">
create table mynewtable (Field1 int ..... Field10 int)
</CFQUERY>
<!--- then to delete a database table --->
<CFQUERY DATASOURCE="dbsource">
drop table mynewtable
</CFQUERY>
put these two on seperate pages otherwise the table will be created and the dropped in the same process.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.