VijeoCitect PLUSADO SQL functions

Marie1982

Member
Join Date
Feb 2007
Location
House
Posts
121
Hi,

I'm using VijeoCitect v7.1 with a local database Microsoft SQL Express. I make requests to that database using the PLUSADOCon.dll functions.

Here is the code that I use:

Code:
GLOBAL STRING Neptune_Connexion = "driver={sql server};SERVER=DELLVMXP\SQLEXPRESS;Database=mydatabasename;UID=sa; PWD=mypassword;Trusted_Connection=no;";

STRING sCommande;
    INT hData;
    
    sCommande = "SELECT EXCLEUNIK FROM Bal_Exp WHERE EnTraitement = '1'";
    
    hData = PLUSADOExecute(Neptune_Connexion, sCommande);

    IF (hData < 1) THEN
        My_MessageBox("VerifExp - Erreur - " + IntToStr(hData),0, StrLeft(PLUSADOGetExecuteError(0),120),StrMid(PLUSADOGetExecuteError(0),120,120),"");
    ELSE
        Exp_CleOrdre = PLUSADOGetFieldText(hData,PLUSADOGetFieldIndex(hData, "EXCLEUNIK"),"");
    END

    PLUSADOClose(hData);

    IF Exp_CleOrdre <> "" THEN
    
        GetExp();
        
    END
It works fine most of the time but sometimes I get this error from SQL Server :"Cannot open database "mydatabasename" requested by the login. The login failed".

Anyone can help me?

Thanks

Marie
 

Similar Topics

I am using VijeoCitect v7.5 on Desktop having Windows-7 OS. While viewing trends, it is observed that trend is not appearing continuous and value...
Replies
1
Views
541
Hi Friends, I have a Vijeocitect SCADA system with One Primary Server, One Secondary, and Two Client Severs, all running on Windows XP Pro...
Replies
5
Views
2,067
Hi Friends, I'm working on a Redundancy discrepancy on our VijeoCitect SCADA, The Primary can not take over when the Secondary Server goes down...
Replies
0
Views
1,278
Hello folks, i bring you a new problem to be solved.. Situation: we have 2 PLC M340, 2 PC's running 1 vijeo citect license + 1 ofs opc each. for...
Replies
2
Views
1,834
Hello all, I got a call yesterday from a worker at a factory where i installed an automation sistem with a PLC M340, operated via SCADA Vijeo...
Replies
3
Views
4,777
Back
Top Bottom