Recent

Author Topic: TMSSQLConnection - sqlDB component for accessing MS SQL Server  (Read 148665 times)

ludob

  • Hero Member
  • *****
  • Posts: 1173
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #75 on: November 16, 2011, 05:04:46 pm »
I searched for sybase session timeouts but other than the tcp keepalive timeout, which is 2 hours per default, I didn't find anything. I traced the output of the GUI that I use (based on jconnect) : it sends a "select getdate()" query about every 400 secs. This is, considering the order of magnitude, just below the 10-15 minutes timeout I'm experiencing.  I also noticed that I'm not receiving TCP Keep-Alive packages from springbok. That could be a router configuration thing anywhere between client and server.   
 

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #76 on: November 16, 2011, 05:09:46 pm »
Local connection (test program using mssqlconn/freetds) is fine after about 20 minutes.
So it is probably a network thing, yes.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Lacak2

  • Guest
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #77 on: November 25, 2011, 08:31:25 am »
Thanks, I've managed to compile dblib.dll including iconv.dll; it seems to work.

Updated the readme for Visual Studio 2010, and clarified some file/download locations etc:
Code: [Select]
Compiling FreeTDS DB-Lib with MS Visual C++ 2005:
=================================================
1.   Download sources from www.freetds.org
2.   *Open FreeTDS.dsw from /win32/msvc6 source directory*
How did you open FreeTDS.dsw in VC++ 2008/2010 (Express or not ?) ?
When I try open /win32/msvc6/FreeTDS.dsw (like stated above in readme.txt) in VS2008 then I get error "Project file ... has been corrupted and cannot be opened", when in VC++ 2010 Express I get error "Project upgrade failed" (it seems be a known issue: http://connect.microsoft.com/VisualStudio/feedback/details/595054/visual-c-2010-express-cannot-open-visual-c-6-0-projects )

Of course in VC++ 2005 Express it can be opened  :)
« Last Edit: November 25, 2011, 10:10:51 am by Lacak2 »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #78 on: November 25, 2011, 10:14:15 am »
<<edited>>
Freetds stable source.
Regular file open (via explorer)/VS2010Pro Service pack 1. Then it goes through the upgrade process.

I'll have a look again & I could post the .sln file (and whatever else it generates, if it's reasonable)
<<edit: mmm, posting the sln file won't help, 2010 has a new format>>



« Last Edit: November 25, 2011, 10:25:28 am by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

ludob

  • Hero Member
  • *****
  • Posts: 1173
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #79 on: November 25, 2011, 10:24:49 am »
Opening FreeTDS.dsw from explorer with VS2008Pro -> prompt to convert project to the new format. No problems encountered.

Lacak2

  • Guest
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #80 on: November 25, 2011, 01:40:39 pm »
Thanks, then problem must be related to Express versions, which I have used.

In case of 2010 it is known problem, which seems be fixed by SP1 in VS2010
In case of 2008 I do not known.

But now I have downloaded VC++ 2008 Express SP1 and all is ok (so I guess, that it was fixed in SP1)
I expect same story with VS2010 (there is also SP1 available)

d.ioannidis

  • Full Member
  • ***
  • Posts: 233
    • Nephelae
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #81 on: November 25, 2011, 05:03:45 pm »
Hi where can i find the latest sources of the TMSSQLConnection ?

mdbs99

  • Full Member
  • ***
  • Posts: 121
  • Software Engineer. Husband. Trader.
    • website
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #82 on: November 26, 2011, 06:36:49 pm »
Hi,
LacaK, good good job!
I'm very impressed with this project and how it progressed!

I should make some performance tests to LacaK, but I didn't do. Very sorry because that.  :'(

Well, how I can help now?  :-\
Do you have a SVN to get the improvements?

Thanks for share.

Lacak2

  • Guest
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #83 on: November 28, 2011, 08:00:12 am »
Hi where can i find the latest sources of the TMSSQLConnection ?
Attached ZIP (GNU libiconv2.dll is required see readme.txt for download location)
If there will be no big objections, I plan post RC2 also into bug report

Lacak2

  • Guest
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #84 on: November 28, 2011, 08:09:09 am »
LacaK, good good job!
I'm very impressed with this project and how it progressed!
Also thanks to others like Reinier and Ludo

I should make some performance tests to LacaK, but I didn't do. Very sorry because that.  :'(
It is OK, IMO most of performance critical code is in FreeTDS (and of course in SQL Server), which we do not develop. So we have only little chance to affect overal performance on freepascal side

Do you have a SVN to get the improvements?
No, until sources will not be merged into standard freepascal fcl-db SVN ... you can send diffs to me and I will do merging manualy (If I will agree with changes  :D )

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #85 on: November 28, 2011, 11:34:47 am »
If there will be no big objections, I plan post RC2 also into bug report
No objections at all!

Hope it gets included into fcl-db; seems like a good way to work with SQL Server/Sybase...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

d.ioannidis

  • Full Member
  • ***
  • Posts: 233
    • Nephelae
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #86 on: November 28, 2011, 11:53:52 am »
Hi

 i get EDatabaseError 'transaction not set' if i open, close and reopen the connection.

Used a TSQLConnector, TSQLTransaction, TSQLQuery and a TButton. The TButton OnClick event have just
Code: [Select]
SQLConnector1.Connected := not SQLConnector1.Connected
Debian Squeeze amd64
FreeTDS 0.82-7
Lazarus rev. 33816 from branches/fixes_0_9_30 rev. 33816
Free Pascal from branches/fixes_2_6 rev. 19693
MS SQL Server 2005 i386



Lacak2

  • Guest
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #87 on: November 28, 2011, 01:15:07 pm »
i get EDatabaseError 'transaction not set' if i open, close and reopen the connection.
IMO it is now fixed in trunk http://bugs.freepascal.org/view.php?id=20694

mdbs99

  • Full Member
  • ***
  • Posts: 121
  • Software Engineer. Husband. Trader.
    • website
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #88 on: November 28, 2011, 03:28:46 pm »
Hi where can i find the latest sources of the TMSSQLConnection ?
Attached ZIP (GNU libiconv2.dll is required see readme.txt for download location)
If there will be no big objections, I plan post RC2 also into bug report
I tested that new version and everything worked.  :D
« Last Edit: November 28, 2011, 07:35:05 pm by md »

mdbs99

  • Full Member
  • ***
  • Posts: 121
  • Software Engineer. Husband. Trader.
    • website
Re: TMSSQLConnection - sqlDB component for accessing MS SQL Server
« Reply #89 on: November 30, 2011, 12:28:26 pm »
I think I found a possible bug:
If you call StartTransaction, the DataSets on the Form are closed.
The connection still open, but you should Close/Open the DataSets to use them.

 

TinyPortal © 2005-2018