Kerplunk, como eu nao havai conseguido usar o Firebird via ADO crieu um ODBC
Valew!!!
Mas já resolvi meu problema segue o codigo de como criar o DNS da conexao ODBC via códifo
Adaptar para quem precisar!
Private Sub Cria_DSN()
On Error GoTo TrataErro
Dim RegObj As New WshShell
Dim OSVer As String
Dim SysEnv
'LOCAL DA CRIAÇÃO DO ODBC
Dim str_REG_KEY_PATH As String
Dim str_Dbname As String
Dim str_Description As String
Dim str_Dialect As String
Dim str_DrvrPath As String
Dim str_Password As String
Dim str_User As String
Dim str_NomeDriver As String
Dim str_NomeDNS As String
str_NomeDNS = "Nome_Do_DNS"
str_REG_KEY_PATH = "HKEY_LOCAL_MACHINESOFTWAREODBCODBC.INI" & str_NomeDNS
str_Dbname = "Caminho_Do_Banco"
str_Description = "Descracao_Do_Banco"
str_Dialect = 3
str_Password = "Senha_Do_Banco"
str_User = "Usuario"
str_NomeDriver = "Firebird/InterBase(r) driver" 'ou outro
'VERIFICA O SISTEMA OPERACIONAL
Set SysEnv = RegObj.Environment("SYSTEM")
OSVer = UCase(SysEnv("OS"))
'CONSISTE A LOCAL DA DLL
Select Case OSVer
Case "WINDOWS_NT"
str_DrvrPath = "C:WinNTSystem32"
Case Else
str_DrvrPath = "C:WindowsSystem"
End Select
'CRIA OS VALORES DO ODBC
RegObj.RegWrite str_REG_KEY_PATH & "AutoQuotedIdentifier", "N", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "CharacterSet", "NONE", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "Client", "", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "Dbname", str_Dbname, "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "Description", str_Description, "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "Dialect", str_Dialect, "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "Driver", str_DrvrPath & "OdbcFb.dll", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "JdbcDriver", "IscDbc", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "LockTimeoutWaitTransactions", "", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "NoWait", "N", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "Password", str_Password, "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "QuotedIdentifier", "Y", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "ReadOnly", "N", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "Role", "", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "SafeThread", "N", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "SensitiveIdentifier", "N", "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "User", str_User, "REG_SZ"
RegObj.RegWrite str_REG_KEY_PATH & "UseSchemaIdentifier", "0", "REG_SZ"
'point to data sources key
str_REG_KEY_PATH = "HKEY_LOCAL_MACHINESOFTWAREODBCODBC.INIODBC Data Sources" & str_NomeDNS
RegObj.RegWrite str_REG_KEY_PATH & "", str_NomeDriver, "REG_SZ"
'and add the name of the new dsn and the driver to use with it
RegObj.RegWrite str_REG_KEY_PATH, str_NomeDriver, "REG_SZ"
Set RegObj = Nothing
Set SysEnv = Nothing
End Sub