Conexão Com Banco de Dados Por ADO - VB & ASP 'This improvements have been written by Eliel Vieira - 27/11/2002 'Update 19/05/2004 'E-mail: elielvieira03@yahoo.com - Page: http://elielvieira.go.to 'Setting constants of the connection ADO Dim db As New ADODB.Connection Dim rs As New ADODB.Recordset 'Setting constants of the time of the connection ADO db.ConnectionTimeout = TIME_OUT 'Setting constants of the connection ADO db.Open "Provider=SQLOLEDB;Data Source=" & IP_SERVER & ";DataBase=" & MY_DSN & ";", USER_SQL, USER_SQL_PASSWORD 'Setting the sql meu_sql = "select * from tabela " 'Constants config of the ADO connection to execute recordset Set rs = db.Execute(meu_sql, , adCmdText) 'Setting date to format dmy meu_sql = "set dateformat dmy " 'Constants config of the ADO connection to execute recordset db.Execute(meu_sql) 'Closing connection rs.Close db.Close