Dans Delphi7 j'utilise le composant TSQLConnection (DbExpress) pour une connexion avec une base Oracle10g d'un côté, et de l'autre un ActiveX de SAPGUI 640 (TGuiApplication) pour piloter des transactions SAP (système de gestion de production).
Sous windows2000, pas de problème.
Sous windowsXP pro, j'accède à SAP tant que la connexion Oracle n'a pas été initialisée. Dès la première connexion à Oracle10g, et même après déconnexion, toutes tentatives d'accéder à SAP se soldent par le message "SAPGui component could not be instantiated".
D'ou vient cette erreur ?, s'agit-il d'un problème de configuration de windowsXP (sécurité) ?. Merci de toutes réponses
Code test:
[Modération]
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 procedure TFormMain.Button1Click(Sender: TObject); var AString : String; begin if FormStdSAP.SAPLogonDone = False then begin FormStdSAP.SAPGuiApplication := TGuiApplication.Create(Self); FormStdSAP.SAPScriptingLogon(ApplicationPath,AString); end else begin FormStdSAP.SAPGuiApplication.Free; FormStdSAP.SAPLogonDone := false; end; end; procedure TFormMain.Button2Click(Sender: TObject); begin if ASQLConnection = nil then begin try ASQLConnection := TSQLConnection.Create(Self); ASQLConnection.ConnectionName := 'OracleConnection'; ASQLConnection.DriverName := 'Oracle'; ASQLConnection.GetDriverFunc := 'getSQLDriverORACLE'; ASQLConnection.LibraryName := 'dbexpora.dll'; ASQLConnection.LoginPrompt := false; ASQLConnection.VendorLib := 'oci.dll'; ASQLConnection.Name := 'SQLConnection1'; ASQLConnection.TableScope := [tsTable,tsView]; ASQLConnection.LoadParamsOnConnect := false; ASQLConnection.Params.Loadfromfile('c:\Tests\Inifiles\dbxconnections.ini'); ASQLConnection.Connected := True; except end; end else begin ASQLConnection.Connected := False; ASQLConnection.Free; ASQLConnection := nil; end; end;
Merci d'utiliser les balises code ou quote,Laurent Dardenne
[/Modération]
Partager