amigo,
use o ADO
Public oCmmd As ADODB.Command
Public oConn As ADODB.Connection
Public oRs As ADODB.Recordset
Public sSql As String
oConn.Open ("Provider=MSDAORA.1;Password= " & Password_BD & _
";User ID= " & UserID_BD & _
";Data Source= " & DataSource_BD & ";Persist Security Info= True")
Set oRs = New ADODB.Recordset
sSql = "SELECT * From (tabela) WHERE codigo = " & variavel & " and dia = " variavel
Set oRs = oConn.Execute(sSql)