Home > Net >  Winform project connect to the database
Winform project connect to the database

Time:02-26

Can write some original.net WEB in the WEB. Config the connectionStrings write the ODBC connection character, and then when needed in the WEB can be operated by the following,
Dim STR As String=ConfigurationManager. ConnectionStrings (" txtConnectionString "). The ConnectionString
Dim conn As SqlConnection=New SqlConnection (STR)
Dim CMD As New SqlCommand (txtSql, conn.)
Cmd.Com mandType=Data.Com mandType. Text
Conn. The Open ()
.

Now contact winform, found different, don't know how I can and as good web and database through the ODBC connection management, query, update, delete
  • Related