Recent

Author Topic: LazSqlX  (Read 144559 times)

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: LazSqlX
« Reply #105 on: September 13, 2014, 12:53:40 pm »
Installing what? Either SQL Server or lazsqlx: no, it should have no relevance.

Are you using dynamic ports (default) or a static port (e.g. 1433)? The connection code in lazsqlx may (I don't know, haven't looked at that) deal with either situation incorrectly...

1) Installing LazSql.

2) Using MS SQL Studio 2014, ports aren't something I'm required to enter, so I assume dynamic. Currently the SQL server is on the same machine as LazSql. In my attempts to get this to work, I have used port 0 and 1433 as suggested. Neither seems to make any difference.


Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: LazSqlX
« Reply #106 on: September 13, 2014, 12:54:07 pm »
BigChimp may be right, when I switched to sqldb I forgot to handle the Port, but with Zeos was already handled. I guess in connection properties there should be specified the port number since the Sqldb connections don't have that in public properties
I honestly don't know about named instances.  If I understand what @Taazz is saying, then you shouldn't have to handle ports with named instances - the named pipes they use handle that.  But yeah - I'm unsure.

Default instances are easier.  You set TMSSQLConnection.Hostname to hostname:port (so for instance 127.0.0.1:1433 should work to connect to a local server running a default instance)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: LazSqlX
« Reply #107 on: September 13, 2014, 12:56:32 pm »
2) Using MS SQL Studio 2014, ports aren't something I'm required to enter, so I assume dynamic. Currently the SQL server is on the same machine as LazSql. In my attempts to get this to work, I have used port 0 and 1433 as suggested. Neither seems to make any difference.

Oh.  Here's a question for others.   Do we know if the freetds dlls are able to connect to MS SQL Studio 2014?  I've only really tested 2008 R2...
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: LazSqlX
« Reply #108 on: September 13, 2014, 01:18:15 pm »
@Zath: yes, you're probably using dynamic ports.

http://www.freepascal.org/docs-html/fcl/mssqlconn/tmssqlconnection.hostname.html
"TMSSQLConnection specific: you can specify an instance or a port after the host name itself.

Instance should be specified with a backslash e.g.: 127.0.0.0.1\SQLEXPRESS. Port should be specified with a colon, e.g. BIGBADSERVER:1433

See http://www.freetds.org/userguide/portoverride.htm"
So you can either specify an instance or a port, but not both.

(AFAIR, using multiple instances depends on the sql server agent or browser something service which listens on udp 1434 and redirects clients to the appropriate (dynamic or static) port. But I may misremember).
« Last Edit: September 13, 2014, 01:20:15 pm 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

flamer0n

  • Guest
Re: LazSqlX
« Reply #109 on: September 13, 2014, 01:42:25 pm »
This may be irrelevant but
Quote
EINOutError/Can not load DB-Lib client library "dblib.dll". Check your installation
Make sure you have all required dlls installed (e.g. dblib.dll, libiconv2.dll)
Make sure you have all required C/C++ runtime libraries installed that dblib.dll
Make sure the bitness (32 or 64 bit) of the dblib library and your compiled program match

What if it has smth to do with c++ runtime libraries (some version, potentially with a windows update, that freetds dblib is not compatible with)?
Zeos (with the ancient ntwdblib.dll) connects but
Sqldb doesn't.
To clear up this instance pipe, static dynamic port thing, just download a version 4.0x that uses Zeos, and see if it connects

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: LazSqlX
« Reply #110 on: September 13, 2014, 01:45:57 pm »
2) Using MS SQL Studio 2014, ports aren't something I'm required to enter, so I assume dynamic. Currently the SQL server is on the same machine as LazSql. In my attempts to get this to work, I have used port 0 and 1433 as suggested. Neither seems to make any difference.

@Zath: What version of MS SQL Studio 2014 do you have installed?
http://msdn.microsoft.com/en-au/evalcenter/dn434042.aspx

I'm asking so I can find out what configuration tools you have available...  Going on what @BigChimp has posted above, you may need to start certain services...

To clear up this instance pipe, static dynamic port thing, just download a version 4.0x that uses Zeos, and see if it connects

@Zath has already reported an earlier version connects OK, but yeah - I'm not sure which version...

Side note:  I'm thinking that LazSQLx is getting to need it's own sub-forum :)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

flamer0n

  • Guest
Re: LazSqlX
« Reply #111 on: September 13, 2014, 02:04:53 pm »
Well, ok, if this thread is getting out of shape or violating forum rules, we can do something about it, lock, remove etc i don't mind

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: LazSqlX
« Reply #112 on: September 13, 2014, 02:11:48 pm »
I don't think it's violating any forum rules (do we have any?). What's going on here is similar to LazPaint and some other apps.  I'm also finding this topic fascinating, so would hate for it be locked.

Just thinking that future people trying to search the forum for resolution connection issues are going to get lost in this topic.  Perhaps you could have an "[Announcement] LazSQLx" style thread that you use when you make new releases, and we should move this conversation over to something like "LazSQLx SQLDB MS SQL Connection Issue".
Not sure though, I've never been involved in such a long thread before...
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
Re: LazSqlX
« Reply #113 on: September 13, 2014, 02:12:39 pm »
Well, ok, if this thread is getting out of shape or violating forum rules, we can do something about it, lock, remove etc i don't mind

I don't think it needs its own forum, but the threads should focus on specific issues and be titled accordingly
Lazarus 3.0/FPC 3.2.2

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: LazSqlX
« Reply #114 on: September 16, 2014, 10:20:21 am »
flameron, don't let my inability to connect to MSSQL detract from the main thrust of the program.
Later releases might resolve the issue anyway.

For the record, I'm using Express with Advanced Services (SQLEXPRADV).

flamer0n

  • Guest
Re: LazSqlX
« Reply #115 on: September 16, 2014, 10:36:35 am »
Zath, I gave LazSqlX to some friends/colleagues to play with it. Yesterday one of them reported the same problem as you did. I went to his PC to see if I can find something unusual. Windows(7) updates were waiting to be installed (notification bubble). So, I asked him and he agreed to restart his PC, after that I tried again LazSqlx and it could connect to any MsSQL Server we have here. I'm not saying this your case too, but certainly one of 'those' cases. So I still don't know what to do about it.

flamer0n

  • Guest
Re: LazSqlX
« Reply #116 on: September 16, 2014, 05:00:13 pm »

version 4.3.1

Changes:
 - Select dbengine on connect (choose between SqlDb and Zeos - except for MySql which runs with Zeos only, for now)

Things i've noticed:
Zeos with sqlite: no descriptive errors;
Zeos with mssql: no unicode support;
Zeos with dbs that support guid fields: doesn't seem to handle it properly;


Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: LazSqlX
« Reply #117 on: September 16, 2014, 05:21:12 pm »
Good news on the release :-)

I was on the zeos forum the other day, and I note you were mentioned there.  Zeos are under the impression that in fact it's sqldb that doesn't handle GUIDs correctly (note: I have no knowledge of this issue)
http://zeoslib.sourceforge.net/viewtopic.php?f=40&t=18581&sid=193cd18004db8d6b18281b7a3dd2e305#p34328

Also - looks like you're still using the ODBC icon for MS SQL.  There's a kind of OK icon for this in the TMSSQLConnection component (though lord knows how you'd retrieve the original :-) )

« Last Edit: September 16, 2014, 05:23:58 pm by Mike.Cornflake »
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: LazSqlX
« Reply #118 on: September 16, 2014, 05:31:29 pm »
Find attached an MSSQL specific 16x16 icon taken from my code Librarian
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: LazSqlX
« Reply #119 on: September 16, 2014, 06:18:29 pm »
Find attached an MSSQL specific 16x16 icon taken from my code Librarian
Swiped for my own nefarious uses :-)   Many thanks :-)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

 

TinyPortal © 2005-2018