C#+ rename Access database

  • 12 years ago

     

    hey frens,

    actually i need to create tables with the user entered value at runtime . i tried providing table name in a string then cerate table through CREATE statement. but it creates table with name the variable name but not value in the variable.

    string r = list_tower.Items[1].ToString();

    string command2 = "CREATE TABLE '"+r+"'(name text(50) NOT NULL)";

    string command2 = "CREATE TABLE r(name text(50) NOT NULL)";

    i tried both of the statements above but failed to get the required result. i think an alternative to this problem is to first crate table and rename it. i need the syntax to rename.

    Thanks

    Radhika

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Before software should be reusable, it should be usable.” - Ralph Johnson