开发者

vb.net query for creating table

开发者 https://www.devze.com 2023-01-24 09:36 出处:网络
I have Access as my back end. Student is the database name and its path is c:\\Project\\student.mdb And am hav开发者_开发问答ing few tables in it. When i click a command button in vb.net a new table

I have Access as my back end. Student is the database name and its path is c:\Project\student.mdb

And am hav开发者_开发问答ing few tables in it. When i click a command button in vb.net a new table must be created in the path mentioned. And it should have the fields I declare.

What s the query I need to use ? Is it possible to do like that ?


Yes, it's possible, you can check out the syntax for the create table command.

However, I have to say that creating tables dynamically suggests a bad database design. The database layout should normally remain the same whatever data you put in the database.

If you create tables dynamically, that means that you have data in the table names, but data should go inside the tables, not in table names (or even field names).


Yes it's possible . Just pass the create table command as query and the table name as variable , which you want to add dynamically. for reference of create table command

Create table command

0

精彩评论

暂无评论...
验证码 换一张
取 消