Newsgroup: it.comp.lang.visual-basic
Titolo: Help su ORACLE7 a Ado

Ho una procedura che importa dei dati dal Server1 dove gira Oracle e li
spara in un database
Access97 presente sul disco locale del sever2, l'eseguibile gira su
Server2.
Se lanciata a manina (d-click sull'exe) funziona alla perfezione, se
invece schedulata con lo
scheduler di NT Server 4.0 (comando AT) ottengo il seguente errore:
"-
2147467259
 Oracle Client and networking components were not found.
These components are supplied
by Oracle Corporation and are part of the Oracle Version 7.3.3 or later
client software
installation.
Provider is unable to function until these components are installed"
Premetto che il client di Oracle 7 Workgroup Edition é installato sulla
macchina, ma soprattutto
perché mai se schedulato va in errore e se lanciato a mano funziona
benissimo ???
Please Help me !!!
Saluti a tutti
Mirko
-------------------------------------------------
C O D I C E
-------------------------------------------------
Option Explicit
Dim CONN, CONN_SRC As ADODB.Connection
Dim RCDS As ADODB.Recordset
Private Sub Form_Load()
    Me.Show
 
    On Error GoTo errori
 
    Dim dataodierna As String
    Dim datafiltro, datafiltroDD, datafiltroMM, datafiltroYY As String
    Dim strSQL As String
    dataodierna = Format$(Now, "dd" & "/" & "mm" & "/" & "yyyy")
    datafiltro = DateAdd("d", -60, Now)
    datafiltroDD = Day(datafiltro)
    datafiltroMM = Month(datafiltro)
    datafiltroYY = Year(datafiltro)
    Select Case datafiltroMM
        Case 1
            datafiltroMM = "GEN"
        Case 2
            datafiltroMM = "FEB"
        Case 3
            datafiltroMM = "MAR"
        Case 4
            datafiltroMM = "APR"
        Case 5
            datafiltroMM = "MAG"
        Case 6
            datafiltroMM = "GIU"
        Case 7
            datafiltroMM = "LUG"
        Case 8
            datafiltroMM = "AGO"
        Case 9
            datafiltroMM = "SET"
        Case 10
            datafiltroMM = "OTT"
        Case 11
            datafiltroMM = "NOV"
        Case 12
            datafiltroMM = "DIC"
    End Select
 
    datafiltro = datafiltroDD & "-" & datafiltroMM & "-" &
Right$(datafiltroYY, 2)
 
    Set CONN = New ADODB.Connection
    Set RCDS = New ADODB.Recordset
    Screen.MousePointer = vbHourglass
    On Error GoTo errori
    With CONN
      .Provider = "Microsoft.Jet.OLEDB.4.0"
      .ConnectionString = "Provider=MSDAORA.1;Password=scat;User
ID=scat;Data
Source=SCATREM_DB;Persist Security Info=True"
      .ConnectionTimeout = 60
      .Mode = adModeReadWrite
      .CursorLocation = adUseServer
      .Open
    End With
    strSQL = "SELECT TO_CHAR(TRANSIT_DATE, 'DD/MM/YYYY HH24:mi:ss') AS
DATA, IDENTIFIER,
CARD_NUMBER, STR_DIRECTION FROM HA_TRANSIT WHERE TRANSIT_DATE>='" &
datafiltro & "' AND
((TERMINAL='49M10000') OR (TERMINAL='49K10000') OR (TERMINAL='49AD0000')
OR (TERMINAL='49AC0000')
OR (TERMINAL='49C10000')) ORDER BY TRANSIT_DATE"
 
    RCDS.CursorLocation = adUseServer
    RCDS.Open strSQL, CONN, adOpenStatic, adLockReadOnly
 
 
    RCDS.MoveFirst
    Do While Not RCDS.EOF
	'
 	'operazioni
	'
        RCDS.MoveNext
    Loop
    'chiusura connessioni
 
    End
End Sub
PROJECT REFERENCES
Visual Basic For Applciations
Visual Basic Runtime Objects and Procedures
Visual Basic Objects and Procedures
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
Microsoft DAO 2.5/3.51 Compatibility Library
Micrisoft Data Binding Collection VB 6.0 (SP4)
Microsoft Visual Basic for Application Extensibility 5.3
-- 
Posted via Mailgate.ORG Server - 
http://www.Mailgate.ORG

    Dim datafiltro, datafiltroDD, datafiltroMM, datafiltroYY As String
La riga di sopra in VB equivale a:
Dim datafiltro As VARIANT
Dim datafiltroDD As VARIANT
Dim datafiltroMM As VARIANT
Dim datafiltroYY As STRING
-- 
ciao, hal