hello :)

i'm using MS access as a database of my Windows form application.
i'm having problem with create table query, with variable table name. i have tried, but it din't work, as i tried. plz provide an example that can make me understand.
suppose,

string city = "newyork";

and city should be the name of table in example.

Thanks :)

Re: Creating Table query through Windows Form Application 80 80

please post the sql that is not working

Re: Creating Table query through Windows Form Application 80 80

heres the query that i have used:

"create table '" + new_city + "' (ID AUTONUMBER, population TEXT, area TEXT)";

try to mention adding primary key constraint aswell.

thanks :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.