Recent

Author Topic: Work with MSSQL, ADO and ZEOSLIB with Lazarus  (Read 4180 times)

HappyHippo

  • Newbie
  • Posts: 2
Work with MSSQL, ADO and ZEOSLIB with Lazarus
« on: September 07, 2018, 11:51:09 am »
Hello, i tried to use the ZEOSLIB with ADO to work with Data on MSSQL-Server. If i connect to a table, which contains just fields with strings, it works fine, but if i try it with other fieldtypes (i.e. DateTime) i get after compiling of the progran strange error messages like "Invalid variant typecast". Have someone any expiriance with that kind of problems?

Regards

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: Work with MSSQL, ADO and ZEOSLIB with Lazarus
« Reply #1 on: September 07, 2018, 01:38:28 pm »
The First question are
What for a version of zeoslib ?
Win10/64 ?? Or Linux ?
Show a peace of code
regards
Andreas

HappyHippo

  • Newbie
  • Posts: 2
Re: Work with MSSQL, ADO and ZEOSLIB with Lazarus
« Reply #2 on: September 13, 2018, 08:56:47 am »
Hello Andreas,
the whole scenario is on a WindowServer 2012R2
MSSQL Version 14.0.1000
SQL Server Vative Client 11.0

Lazarus 1.8.4 64Bit and zeosdbo-7.2.4-stable
An exemple project is in the attached files
best regards

orionyx

  • New member
  • *
  • Posts: 8
Re: Work with MSSQL, ADO and ZEOSLIB with Lazarus
« Reply #3 on: September 24, 2018, 11:27:59 pm »
Check to see that your encoding on the databases you are accessing is utf8, and your collation sequence is utf8-unicodvary e-ci. Then those nasty messages should go away.
But be careful of timestamp, date and time encoding - they vary a lot between databases.

 

TinyPortal © 2005-2018