Re: Control over connection periode
Posted by: Terri Kelley
Date: December 17, 2004 09:25AM

Something like this:
Dim strConnect As String
strConnect = "Database = database; DataSource = server; User ID=user; Password=password;"
Dim cnConnect As New MySqlConnection(strConnect)
cnConnect.Open( )
Dim cmdNewEmp As String
cmdNewEmp = "Select * from emp"
Dim daNewEmp As New MySqlDataAdapter(cmdNewEmp, cnConnect)
'rest of the code...

cnConnect.Close( )

Connect will stay open for everything between the open and close.


Options: ReplyQuote

Written By
Re: Control over connection periode
December 17, 2004 09:25AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.