Resolved How do I create a table in an existent database SQL VB2017

manny cash

Member
Joined
Oct 19, 2024
Messages
12
Programming Experience
Beginner
I already made a SQL database programmatically and want to create a table programmatically, too (code) but, I do not know how can I start up. I was looking on the web unfortunately I did not find any sign. If somebody know how I will appreciate in advance your help. Thank you so much.
 
You do it by executing the appropriate SQL against the database. If you want to execute SQL that is not a query against a SQL Server database, you create a SqlCommand and call ExecuteNonQuery. It doesn't matter if it's a CREATE TABLE statement (DDL: Data Definition Language) or an INSERT, UPDATE or DELETE statement (DML: Data Manipulation Language). It's SQL and it's not a query so that's how it's done. As for what SQL to execute, as always, start with the relevant documentation. That and many other relevant web pages can be found with the obvious web search.
 
You do it by executing the appropriate SQL against the database. If you want to execute SQL that is not a query against a SQL Server database, you create a SqlCommand and call ExecuteNonQuery. It doesn't matter if it's a CREATE TABLE statement (DDL: Data Definition Language) or an INSERT, UPDATE or DELETE statement (DML: Data Manipulation Language). It's SQL and it's not a query so that's how it's done. As for what SQL to execute, as always, start with the relevant documentation. That and many other relevant web pages can be found with the obvious web search.

Thank you very much for your help I think you give me the right clue.
 
You do it by executing the appropriate SQL against the database. If you want to execute SQL that is not a query against a SQL Server database, you create a SqlCommand and call ExecuteNonQuery. It doesn't matter if it's a CREATE TABLE statement (DDL: Data Definition Language) or an INSERT, UPDATE or DELETE statement (DML: Data Manipulation Language). It's SQL and it's not a query so that's how it's done. As for what SQL to execute, as always, start with the relevant documentation. That and many other relevant web pages can be found with the obvious web search.

thank you this issue is done
 
thank you this issue is done

If your issue is resolved, you should use the button above the first post to mark the thread Resolved. That way, everyone can see that you need no more help without having to open the thread and read it. It also helps people with similar issues to know that a solution has been provided. I have done it for you this time.
 
Back
Top