Home > database >  O great god solve the SQL problem
O great god solve the SQL problem

Time:09-17

How to let WINFROM implement SQL database query, for example, to connect the native database, WINFORM dialog box, shows the machine has several database,

CodePudding user response:

Suggest you according to the interface of SSMS with tree control TreeView construct a tree,
Check out several database:
Select * from sys. Databases
The query table:
Select * from sys. Tables
Query list:
Select * from sys. The columns where object_id=object_id (' the name of the table)

CodePudding user response:

reference 1/f, gypsy song response:
suggest you according to the interface of SSMS with tree control TreeView construct a tree,
Check out several database:
Select * from sys. Databases
The query table:
Select * from sys. Tables
Query list:
Select * from sys. The columns where object_id=object_id (' table ')


Sql Server 2012 measured, query the database statement:
Use the master
SELECT the NAME FROM SYSDATABASES

CodePudding user response:

refer to the second floor one tree forest _ response:
Quote: refer to 1st floor gypsy song response:

Suggest you according to the interface of SSMS with tree control TreeView construct a tree,
Check out several database:
Select * from sys. Databases
The query table:
Select * from sys. Tables
Query list:
Select * from sys. The columns where object_id=object_id (' table ')


Sql Server 2012 measured, query the database statement:
Use the master
SELECT the NAME FROM SYSDATABASES


Can, and the current library need not specify,
  • Related