How to release SQLConncetion session?

Help
Anonymous
2011-12-27
2013-05-01

  • Anonymous
    2011-12-27

    I used DEMO code:
        dbx_mssql_connect.MsSqlConnect(
          cn,
          2008,
          {SERVER=} sHost,
          {DATABASE=} sDatabase,
          {User=} sUserID,
          {Password=} sPassword
        );
       
    First connect: 192.168.1.1 / DB1
    second connect: 192.168.1.2 / DB2

    Table struct is same in DB1 and DB2.

    After change connection, I execute:
    cn.Execute( 'DELETE FROM T1 '
                +'DELETE FROM T2 '
                +'DELETE FROM T3 '
                +'DELETE FROM T4 ', nil);
               
    But, Delete table in DB1 !!!
    Why??

     
  • 1) delphi version ?
    2) show the code change the connection

     

  • Anonymous
    2011-12-28

    Ohh…
    Sorry, I miss setting SQL params…

    Forgot this question… Sorry!