Recent

Author Topic: ODBC string Connection Error  (Read 865 times)

eldonfsr

  • Hero Member
  • *****
  • Posts: 574
ODBC string Connection Error
« on: December 22, 2022, 07:16:06 pm »
Hello I star testapp with odbc, I tested the odbc or datasource create on windows odbc , also i tested with c# but when try that on lazarus send me error....
Code: Pascal  [Select][+][-]
  1. {$ifdef CPU32}
  2.     ODBCCon.Driver:='MAS 90 32-Bit ODBC Driver';
  3.   {$endif}
  4.   {$ifdef CPU64}
  5.     ODBCCOn.Driver:='MAS 90 32-Bit ODBC Driver';
  6.   {$endif}  
  7.  
  8. ODbCCon.FILEDSN:='
  9. DSN=MAS90_ODBC;
  10. UID=ep;
  11. PWD=5807;
  12. Directory=C:\\Best\\version4\\mas90;
  13. IniFile=providex.ddf ;
  14. Company=001;
  15. LogFile=\\PVXODB32.LOG;
  16. BurstMode=0;
  17. DirtyReads=0;
  18. CacheSize=4;
  19. EnforceNULLDate=0;
  20. SERVER=NotTheServer;
  21. StripTrailingSpaces=1'
  22.  
  23.  
You can see error and odbc datasource test connection sad is good... I teka e values from odbcsource on sonnection string..

Zvoni

  • Hero Member
  • *****
  • Posts: 3361
Re: ODBC string Connection Error
« Reply #1 on: December 23, 2022, 08:32:50 am »
Why are you assigning the Connection-String to FILEDSN-Property???
And either you have a DSN, in which case you shouldn't need a connection-string defining Driver and whatnot, or you don't

and i was under the impression, that the Driver-Name has to be put in curly brackets
« Last Edit: December 23, 2022, 08:41:20 am by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

eldonfsr

  • Hero Member
  • *****
  • Posts: 574
Re: ODBC string Connection Error
« Reply #2 on: December 23, 2022, 07:10:08 pm »
Yes is true. well you know when you tried diferents ways  is possible make a mistake... now i more confident as i get better understand.......

some time when you receive error is not clear what is wrong....

Thanks for you advance....

 

TinyPortal © 2005-2018