Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-26 Thread Marcos Douglas
On Tue, Jan 25, 2011 at 4:50 PM, José Mejuto wrote: > Hello Lazarus-List, > > Sunday, January 23, 2011, 12:06:12 PM, you wrote: > > MVC> Attached is a possible patch. I don't have MS-SQL (doesn't > MVC> run on Linux) so I can't test. > MVC> Please apply it to packages/fcl-db/src/sqldb/sqldb.pp and

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-26 Thread michael . vancanneyt
On Wed, 26 Jan 2011, Graeme Geldenhuys wrote: Op 2011-01-25 22:45, Michael Van Canneyt het geskryf: This is indeed the problem. However, under Firebird, it is correct. An Execute will return only the first values. Is this true even for stored procs that return a result set (aka temp table

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Graeme Geldenhuys
Op 2011-01-25 22:45, Michael Van Canneyt het geskryf: > > This is indeed the problem. However, under Firebird, it is correct. An > Execute will return only the first values. Is this true even for stored procs that return a result set (aka temp table of data)? Regards, - Graeme - -- fpGUI T

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Michael Van Canneyt
On Tue, 25 Jan 2011, Bo Berglund wrote: On Tue, 25 Jan 2011 21:45:31 +0100 (CET), Michael Van Canneyt wrote: On Tue, 25 Jan 2011, José Mejuto wrote: Hello Lazarus-List, Sunday, January 23, 2011, 12:06:12 PM, you wrote: MVC> Attached is a possible patch. I don't have MS-SQL (doesn't MV

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Bo Berglund
On Tue, 25 Jan 2011 21:45:31 +0100 (CET), Michael Van Canneyt wrote: > > >On Tue, 25 Jan 2011, José Mejuto wrote: > >> Hello Lazarus-List, >> >> Sunday, January 23, 2011, 12:06:12 PM, you wrote: >> >> MVC> Attached is a possible patch. I don't have MS-SQL (doesn't >> MVC> run on Linux) so I can't

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Michael Van Canneyt
On Tue, 25 Jan 2011, José Mejuto wrote: Hello Lazarus-List, Sunday, January 23, 2011, 12:06:12 PM, you wrote: MVC> Attached is a possible patch. I don't have MS-SQL (doesn't MVC> run on Linux) so I can't test. MVC> Please apply it to packages/fcl-db/src/sqldb/sqldb.pp and MVC> report whether

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread José Mejuto
Hello Lazarus-List, Sunday, January 23, 2011, 12:06:12 PM, you wrote: MVC> Attached is a possible patch. I don't have MS-SQL (doesn't MVC> run on Linux) so I can't test. MVC> Please apply it to packages/fcl-db/src/sqldb/sqldb.pp and MVC> report whether this helped you MVC> solve your problem. If

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread José Mejuto
Hello Lazarus-List, Tuesday, January 25, 2011, 8:08:14 PM, you wrote: >>What happens if you put an explicit .First before the loop? >> query.Active:= true; >> query.First; >> while not query.EOF do >> begin >> S := S + query.FieldByName('AppNo').AsString + #13#10; >> query.Next; >

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Bo Berglund
On Tue, 25 Jan 2011 09:13:42 +, Mark Morgan Lloyd wrote: >Bo Berglund wrote: > >> Both work, but return only one record (there should be 4). >> Or at least the code loop below only traverses once: >> >> while not query.EOF do >> begin >> S := S + query.FieldByName('AppNo').AsString +

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Michael Van Canneyt
On Tue, 25 Jan 2011, Bo Berglund wrote: On Mon, 24 Jan 2011 23:29:41 +0100, Bo Berglund wrote: From testing with MS-Access and MySQL I know that ODBC works fine with other databases, at least for SELECT Statements. 1. Can you test a regular SELECT statement on the same SQL database ?

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Bo Berglund
On Mon, 24 Jan 2011 23:29:41 +0100, Bo Berglund wrote: >> >>>From testing with MS-Access and MySQL I know that ODBC works fine with other >>databases, at least for SELECT Statements. >> >>1. Can you test a regular SELECT statement on the same SQL database ? >>If that doesn't work either, we

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Bo Berglund
On Tue, 25 Jan 2011 09:22:28 +0100 (CET), michael.vancann...@wisa.be wrote: >> Can you please specify which ODBC database components you used in >> Delphi 7?? >> For example what is the type of Query1? >> And if it needs a database connection component to work, what is that? > >You can use TDatab

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Mark Morgan Lloyd
Bo Berglund wrote: Both work, but return only one record (there should be 4). Or at least the code loop below only traverses once: while not query.EOF do begin S := S + query.FieldByName('AppNo').AsString + #13#10; query.Next; end; What happens if you put an explicit .First befo

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread Sven Barth
Am 24.01.2011 18:49, schrieb Bo Berglund: I tried to use the debugger and "step into" the query.Open method to see what was going on but it seems like this is not allowed by lazarus, it does just like I had clicked "step over". That is because the "Open" method is located inside unit "db" which

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-25 Thread michael . vancanneyt
On Tue, 25 Jan 2011, Bo Berglund wrote: On Tue, 25 Jan 2011 00:04:27 +0100, "Dipl. Phys. Jörg Schläger" wrote: I used the following code in progs compiled with delphi 5, delphi7 and delphi 2007 with winxp sp1 to win 7 with MSsql2000 and MSsql2005 without problem Listbox1.Clear; Query1.sq

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Bo Berglund
On Tue, 25 Jan 2011 00:04:27 +0100, "Dipl. Phys. Jörg Schläger" wrote: >I used the following code in progs compiled with >delphi 5, delphi7 and delphi 2007 with winxp sp1 to win 7 >with MSsql2000 and MSsql2005 without problem > > Listbox1.Clear; > Query1.sql.Clear; > Query1.sql.add('exec Aufna

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Dipl. Phys. Jörg Schläger
-- Dipl. Phys. Jörg SchlägerZitat von Bo Berglund : >> >> 1. Can you test a regular SELECT statement on the same SQL database ? >>If that doesn't work either, we know the problem is in the ODBC >> connection component. >> >> 2. Can you test the same EXEC statement in a Delphi app through O

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Bo Berglund
On Mon, 24 Jan 2011 22:20:38 +0100 (CET), Michael Van Canneyt wrote: > >In general RecordCount cannot be trusted; >It can be updated as the TDataset fetches records. > >In each case: SQLDB relies on ODBC to connect to MS-SQL. > >>From testing with MS-Access and MySQL I know that ODBC works fine

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Bo Berglund
On Mon, 24 Jan 2011 22:20:38 +0100 (CET), Michael Van Canneyt wrote: >> As an experiment I added a line as follows after the query.Open >> statement: >> i := query.RecordCount; >> >> But this only affirms the fact that the recordset handled by the query >> only contains a single record, i =

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Michael Van Canneyt
On Mon, 24 Jan 2011, Bo Berglund wrote: On Mon, 24 Jan 2011 19:15:13 +0100, "Dipl. Phys. Jörg Schläger" wrote: Thanks, this was the simple way I have been looking for! Now that I did that the patch activated and I could see that it no longer barfs at the EXEC verb. Still only returns one r

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Bo Berglund
On Mon, 24 Jan 2011 19:15:13 +0100, "Dipl. Phys. Jörg Schläger" wrote: >> >> Thanks, this was the simple way I have been looking for! >> Now that I did that the patch activated and I could see that it no >> longer barfs at the EXEC verb. >> Still only returns one record out of 4, though. > >is it

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Dipl. Phys. Jörg Schläger
-- Dipl. Phys. Jörg SchlägerZitat von Bo Berglund : > On Mon, 24 Jan 2011 09:28:05 +0200, Graeme Geldenhuys > wrote: > >> Alternatively, add the SqlDB source path to your project, then when you >> compile your project, it will compile the SqlDB code too - as if it was >> part of your project s

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Bo Berglund
On Mon, 24 Jan 2011 09:28:05 +0200, Graeme Geldenhuys wrote: >Alternatively, add the SqlDB source path to your project, then when you >compile your project, it will compile the SqlDB code too - as if it was >part of your project source code. > Thanks, this was the simple way I have been looking

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Bo Berglund
On Sun, 23 Jan 2011 12:06:12 +0100 (CET), Michael Van Canneyt wrote: > >On Sat, 22 Jan 2011, Bo Berglund wrote: > >> On Fri, 21 Jan 2011 17:30:57 +0100 (CET), michael.vancann...@wisa.be >> wrote: >> >>> Without the error message, we cannot begin to start looking for a solution. >>> >>> Michael. >

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Marcos Douglas
On Sun, Jan 23, 2011 at 7:25 PM, Bo Berglund wrote: > On Sun, 23 Jan 2011 19:25:35 -0200, Marcos Douglas >>See this tutorial to build FPC and Lazarus on Windows: >>http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29 > > The

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Graeme Geldenhuys
Op 2011-01-24 11:33, Vincent Snijders het geskryf: > > I would not bet on the make files knowing in what directory the > installer put the compiled unit and explicitly mention the install > prefix, especially on windows. Oh, I thought that was only a Linux issue. I guess I should never assume thi

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Vincent Snijders
2011/1/24 Graeme Geldenhuys : > Op 2011-01-24 10:35, Bo Berglund het geskryf: > The rest of the instruction I have listed before, or what Michael listed > should solve your problem. I always install FPC in a non-standard > location, so for me it is a requirement to specify the INSTALL_PREFIX in > t

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Graeme Geldenhuys
Op 2011-01-24 10:35, Bo Berglund het geskryf: > Pray: God can't help you here, I think he subscribed to another mailing list. :) > exactly how do you do this? What ia FCL? As Michael said. FCL = Free Component Library. It is included with FPC and contains lost of non-GUI components. That would b

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread michael . vancanneyt
On Mon, 24 Jan 2011, Bo Berglund wrote: On Mon, 24 Jan 2011 10:26:14 +0200, Graeme Geldenhuys wrote: Op 2011-01-24 09:57, Andreas Schneider het geskryf: That probably won't work and will only cause trouble. He is probably using the LCL counterpart to sqldb (lazsqldb or however it's cal

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Bo Berglund
On Mon, 24 Jan 2011 10:26:14 +0200, Graeme Geldenhuys wrote: >Op 2011-01-24 09:57, Andreas Schneider het geskryf: >> That probably won't work and will only cause trouble. He is probably >> using the LCL counterpart to sqldb (lazsqldb or however it's called) > >Ah, good point. I always use the

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-24 Thread Graeme Geldenhuys
Op 2011-01-24 09:57, Andreas Schneider het geskryf: > That probably won't work and will only cause trouble. He is probably > using the LCL counterpart to sqldb (lazsqldb or however it's called) Ah, good point. I always use the database components directly from FCL, so this does work in my caus

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Andreas Schneider
On Mon, 24 Jan 2011 09:28:05 +0200, Graeme Geldenhuys wrote: Alternatively, add the SqlDB source path to your project, then when you compile your project, it will compile the SqlDB code too - as if it was part of your project source code. That probably won't work and will only cause trouble

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Graeme Geldenhuys
Op 2011-01-24 01:16, Felipe Monteiro de Carvalho het geskryf: > Maybe it would work if you simply put all units from the directory of > sqldb into the lazarus/lcl directory and rebuild the LCL then. > What are you on about??? Simply recompile the SqlDB code, and install the new *.ppu files! Chan

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Graeme Geldenhuys
Op 2011-01-24 08:43, Bo Berglund het geskryf: > > And btw I have NOT gotten a working solution to the problem of testing > the change in sqldb.pp All you need to do is recompile SqlDB, no need to recompile Lazarus or the FPC compiler! Lazarus simply uses the compiled units *.ppu files create

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sun, 23 Jan 2011 23:25:32 +0100, Bo Berglund wrote: >>> I know how to build Lazarus, but not how to build FPC... >> >>See this tutorial to build FPC and Lazarus on Windows: >>http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sun, 23 Jan 2011 20:32:09 -0500, waldo kitty wrote: >On 1/23/2011 14:15, Bo Berglund wrote: >> After making a search on my complete disk I found the file sqldb.pp in >> the FPC2.4.2 folder tree. >> That is, it was not found in the lazarus tree at all, is this OK? >> >> After adding the new lin

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Dimitri Smits
- "waldo kitty" schreef: > On 1/23/2011 14:15, Bo Berglund wrote: > > After making a search on my complete disk I found the file sqldb.pp > in > > the FPC2.4.2 folder tree. > > That is, it was not found in the lazarus tree at all, is this OK? > > > > After adding the new lines from the patch

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread waldo kitty
On 1/23/2011 14:15, Bo Berglund wrote: After making a search on my complete disk I found the file sqldb.pp in the FPC2.4.2 folder tree. That is, it was not found in the lazarus tree at all, is this OK? After adding the new lines from the patch I want to test it, but I don't know how I can make l

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Felipe Monteiro de Carvalho
Maybe it would work if you simply put all units from the directory of sqldb into the lazarus/lcl directory and rebuild the LCL then. -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.fr

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sun, 23 Jan 2011 19:25:35 -0200, Marcos Douglas wrote: >On Sun, Jan 23, 2011 at 7:13 PM, Bo Berglund wrote: >> On Sun, 23 Jan 2011 21:22:06 +0100, Vincent Snijders >> wrote: >> >>>2011/1/23 Bo Berglund : >>> Now I have rebuilt Lazarus with the changed sqldb.pp file in place in the FPC s

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Marcos Douglas
On Sun, Jan 23, 2011 at 7:13 PM, Bo Berglund wrote: > On Sun, 23 Jan 2011 21:22:06 +0100, Vincent Snijders > wrote: > >>2011/1/23 Bo Berglund : >> Now I have rebuilt Lazarus with the changed sqldb.pp file in place in >>> the FPC sources. I used the Lazarus function to build itself. >>> But the co

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sun, 23 Jan 2011 21:22:06 +0100, Vincent Snijders wrote: >2011/1/23 Bo Berglund : > Now I have rebuilt Lazarus with the changed sqldb.pp file in place in >> the FPC sources. I used the Lazarus function to build itself. >> But the code still rejects the EXEC verb with the same error message >>

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Vincent Snijders
2011/1/23 Bo Berglund : Now I have rebuilt Lazarus with the changed sqldb.pp file in place in > the FPC sources. I used the Lazarus function to build itself. > But the code still rejects the EXEC verb with the same error message > as before. > I have probably not succeeded to make lazarus use the

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sun, 23 Jan 2011 20:15:21 +0100, Bo Berglund wrote: >On Sun, 23 Jan 2011 17:59:37 +0100, Bo Berglund > wrote: > >>On Sun, 23 Jan 2011 12:06:12 +0100 (CET), Michael Van Canneyt > >>>Attached is a possible patch. I don't have MS-SQL (doesn't run on Linux) so >>>I can't test. >>>Please apply it

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sun, 23 Jan 2011 17:59:37 +0100, Bo Berglund wrote: >On Sun, 23 Jan 2011 12:06:12 +0100 (CET), Michael Van Canneyt >>Attached is a possible patch. I don't have MS-SQL (doesn't run on Linux) so I >>can't test. >>Please apply it to packages/fcl-db/src/sqldb/sqldb.pp and report whether this >>

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Dipl. Phys. Jörg Schläger
Zitat von Bo Berglund : > On Sun, 23 Jan 2011 18:23:25 +0100, "Dipl. Phys. Jörg Schläger" > wrote: > >> >> Zitat von Bo Berglund : >> >>> On Sun, 23 Jan 2011 13:53:45 +0100, "Dipl. Phys. Jörg Schläger" >>> wrote: >>> and next you might think of using query.SQL.Text := 'EXEC Sele

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sun, 23 Jan 2011 18:23:25 +0100, "Dipl. Phys. Jörg Schläger" wrote: > >Zitat von Bo Berglund : > >> On Sun, 23 Jan 2011 13:53:45 +0100, "Dipl. Phys. Jörg Schläger" >> wrote: >> >>> >>> and next you might think of using query.SQL.Text := 'EXEC >>> SelectDongleData @@SerialNo=2485'; >> >> Trie

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Dipl. Phys. Jörg Schläger
Zitat von Bo Berglund : > On Sun, 23 Jan 2011 13:53:45 +0100, "Dipl. Phys. Jörg Schläger" > wrote: > >> >> and next you might think of using query.SQL.Text := 'EXEC >> SelectDongleData @@SerialNo=2485'; > > Tried adding an extra @ to parameter. > Results are as follows: > > EXEC SelectDongleDat

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Marco van de Voort
On Fri, Jan 21, 2011 at 01:28:59PM -0300, Marcos Douglas wrote: > > PS. You can also check the forum for more sqldb examples. > > I think Zeoslib use ADO on Windows, but on Linux it uses ODBC, AFAIK. Only with Delphi. FPC misses ADO headers that Zeos bases on. I started translating those, but d

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sun, 23 Jan 2011 12:06:12 +0100 (CET), Michael Van Canneyt wrote: > >On Sat, 22 Jan 2011, Bo Berglund wrote: > >> On Fri, 21 Jan 2011 17:30:57 +0100 (CET), michael.vancann...@wisa.be >> wrote: >> >>> Without the error message, we cannot begin to start looking for a solution. >>> >>> Michael. >

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sun, 23 Jan 2011 13:53:45 +0100, "Dipl. Phys. Jörg Schläger" wrote: > >and next you might think of using query.SQL.Text := 'EXEC SelectDongleData >@@SerialNo=2485'; Tried adding an extra @ to parameter. Results are as follows: EXEC SelectDongleData @@SerialNo=2485 'Cannot open a non-selec

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Dipl. Phys. Jörg Schläger
Zitat von Mark Morgan Lloyd : > Vincent Snijders wrote: >> 2011/1/23 Michael Van Canneyt : >>> Attached is a possible patch. I don't have MS-SQL (doesn't run on Linux) so >>> I can't test. >>> Please apply it to packages/fcl-db/src/sqldb/sqldb.pp and report whether >>> this helped you solve your

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Mark Morgan Lloyd
Vincent Snijders wrote: 2011/1/23 Michael Van Canneyt : Attached is a possible patch. I don't have MS-SQL (doesn't run on Linux) so I can't test. Please apply it to packages/fcl-db/src/sqldb/sqldb.pp and report whether this helped you solve your problem. If so, I will commit it to SVN. The com

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Vincent Snijders
2011/1/23 Michael Van Canneyt : > > Attached is a possible patch. I don't have MS-SQL (doesn't run on Linux) so > I can't test. > Please apply it to packages/fcl-db/src/sqldb/sqldb.pp and report whether > this helped you solve your problem. If so, I will commit it to SVN. The comment is not correc

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Michael Van Canneyt
On Sat, 22 Jan 2011, Bo Berglund wrote: On Fri, 21 Jan 2011 17:30:57 +0100 (CET), michael.vancann...@wisa.be wrote: Without the error message, we cannot begin to start looking for a solution. Michael. I can now answer that after I have restarted the virtual machine where I was investigatin

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Graeme Geldenhuys
On 22 January 2011 23:38, Mark Morgan Lloyd wrote: > > Having just spent a bit of time with Google and MS docs: is EXEC standard? Yes, I would say EXEC is standard in MS SQL-Server. Or at least we used it like that in Delphi and SQL-Server's management tools. -- Regards,   - Graeme -

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-23 Thread Bo Berglund
On Sat, 22 Jan 2011 21:38:34 +, Mark Morgan Lloyd wrote: >Bo Berglund wrote: > >> query.SQL.Text := 'EXEC SelectDongleData @SerialNo=2485'; > >Having just spent a bit of time with Google and MS docs: is EXEC >standard? What happens if you use CALL or EXECUTE? What happens if you >use

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-22 Thread Mark Morgan Lloyd
Bo Berglund wrote: query.SQL.Text := 'EXEC SelectDongleData @SerialNo=2485'; Having just spent a bit of time with Google and MS docs: is EXEC standard? What happens if you use CALL or EXECUTE? What happens if you use positional rather than named parameters? -- Mark Morgan Lloyd markM

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-22 Thread Bo Berglund
On Fri, 21 Jan 2011 17:30:57 +0100 (CET), michael.vancann...@wisa.be wrote: > > > >While I will not comment on the general validity of your statement, for >SQLDB it is certainly not correct. SQLDB was developed exactly to serve a >wide range of programmer needs. Of course, the engines we use ourse

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-22 Thread Graeme Geldenhuys
On 21 January 2011 18:30, wrote: > work currently. That doesn't mean we're not open to fixing it, and enhance > SQLDB in the process. Is SqlDB the correct code to add Firebird service features? By service features, I mean specific features of Firebird like user management API, Event listening AP

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-21 Thread Marcos Douglas
2011/1/21 Frank Church : > > Quite a number of Lazarus components are not designed as a toolkit to serve > a wide range of programmer needs. It is clear that a number of them are > developed for the programmers own needs. Even if they are capable enough to > serve your needs, those features may not

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-21 Thread michael . vancanneyt
On Fri, 21 Jan 2011, Frank Church wrote: On 21 January 2011 15:40, Bo Berglund wrote: On Fri, 21 Jan 2011 13:14:15 +0100, Vincent Snijders wrote: This is off topic, please use lazarus-other list. My question was why a database component that ships with *lazarus* would not work with a

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-21 Thread Frank Church
On 21 January 2011 15:40, Bo Berglund wrote: > On Fri, 21 Jan 2011 13:14:15 +0100, Vincent Snijders > wrote: > > > >This is off topic, please use lazarus-other list. > > My question was why a database component that ships with *lazarus* > would not work with a perfectly legitimate SQL command (w

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-21 Thread Vincent Snijders
2011/1/21 Bo Berglund : > On Fri, 21 Jan 2011 13:14:15 +0100, Vincent Snijders > wrote: You forgot to quote this part: > 2011/1/20 Graeme Geldenhuys >> And with this whole mess I would end by saying: And that is why you >> will not see me ever use a Stored Procedure! 99.99% of the time they >>

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-21 Thread Bo Berglund
On Fri, 21 Jan 2011 13:14:15 +0100, Vincent Snijders wrote: >This is off topic, please use lazarus-other list. My question was why a database component that ships with *lazarus* would not work with a perfectly legitimate SQL command (which we have used for years in Delphi with ADO). I assumed

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-21 Thread Vincent Snijders
2011/1/21 Frank Church : > > Apologies to Vincent, I just couldn't resist, I need to say that Stored Well, I thought the people subscribed to the list where grown ups, that don't need enforced moderation ... I enabled moderation on this thread. Vincent --

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-21 Thread Frank Church
On 20 January 2011 20:05, Graeme Geldenhuys wrote: > On 20 January 2011 20:28, Bo Berglund wrote: > >> > >>Use query.ExecSQL instead of query.Open even in Delphi! > > > > Not if the stored procedure returns a recordset > > And with this whole mess I would end by saying: And that is why you

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-21 Thread Vincent Snijders
2011/1/21 Inoussa OUEDRAOGO : > > > 2011/1/20 Graeme Geldenhuys >> And with this whole mess I would end by saying:  And that is why you >> will not see me ever use a Stored Procedure! 99.99% of the time they >> contain business logic, which doesn't belong in the data layer of your >> application i

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-21 Thread Inoussa OUEDRAOGO
2011/1/20 Graeme Geldenhuys > On 20 January 2011 20:28, Bo Berglund wrote: > >> > >>Use query.ExecSQL instead of query.Open even in Delphi! > > > > Not if the stored procedure returns a recordset > > And with this whole mess I would end by saying: And that is why you > will not see me ever

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-20 Thread Graeme Geldenhuys
On 20 January 2011 20:28, Bo Berglund wrote: >> >>Use query.ExecSQL instead of query.Open even in Delphi! > > Not if the stored procedure returns a recordset And with this whole mess I would end by saying: And that is why you will not see me ever use a Stored Procedure! 99.99% of the time th

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-20 Thread Bo Berglund
On Thu, 20 Jan 2011 09:58:14 -0200, Marcos Douglas wrote: >> >> What did I do wrong regarding the use of TSQLQuery to get this error? > >Use query.ExecSQL instead of query.Open even in Delphi! > Not if the stored procedure returns a recordset -- Bo Berglund Developer in Sweden -- __

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-20 Thread Marcos Douglas
On Wed, Jan 19, 2011 at 7:38 PM, Bo Berglund wrote: > On Wed, 19 Jan 2011 19:27:58 +0100, Bo Berglund > wrote: > >>Did this and indeed now I have the SQLdb tab on my lazarus. > > More problems: > I have created a test application and did a cut-and-paste operation on > the example on this page: >

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-19 Thread Bo Berglund
On Wed, 19 Jan 2011 19:27:58 +0100, Bo Berglund wrote: >Did this and indeed now I have the SQLdb tab on my lazarus. More problems: I have created a test application and did a cut-and-paste operation on the example on this page: http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial#Lazarus

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-19 Thread Bo Berglund
On Wed, 19 Jan 2011 10:05:18 +0100, Sven Barth wrote: > >I'd suggest you the following (Note: the mentioned captions might only >be similar to yours, because I'm using a German Lazarus): >Go to "Packages=>Configure installed packages" and search whether >SQLDBLaz is in "installed" or in "not in

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-19 Thread Sven Barth
Am 18.01.2011 23:34, schrieb Bo Berglund: On Tue, 18 Jan 2011 21:36:59 +, Henry Vermaak wrote: Here is stated the following: "The SQLdb package contains FPC units to access a number of SQL databases. It is "packaged" as sqldblaz.lpk in Lazarus, and the components can be found on the "SQLd

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-18 Thread Bo Berglund
On Tue, 18 Jan 2011 21:36:59 +, Henry Vermaak wrote: >> Here is stated the following: >> "The SQLdb package contains FPC units to access a number of SQL >> databases. It is "packaged" as sqldblaz.lpk in Lazarus, and the >> components can be found on the "SQLdb" tab. " >> >> But in my new Laza

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-18 Thread Henry Vermaak
On 18 January 2011 21:31, Bo Berglund wrote: > On Sat, 15 Jan 2011 10:34:25 +0100, Bo Berglund > wrote: > >>On Sat, 15 Jan 2011 09:42:01 +0100, Bo Berglund >> wrote: >> >>>Is there an alterate connection mechanism that can be used towards >>>MSSQLServer which works also on Linux so the applicatio

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-18 Thread Bo Berglund
On Sat, 15 Jan 2011 10:34:25 +0100, Bo Berglund wrote: >On Sat, 15 Jan 2011 09:42:01 +0100, Bo Berglund > wrote: > >>Is there an alterate connection mechanism that can be used towards >>MSSQLServer which works also on Linux so the applications can be made >>cross-platform? The database itself wil

Re: [Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-15 Thread Bo Berglund
On Sat, 15 Jan 2011 09:42:01 +0100, Bo Berglund wrote: >Is there an alterate connection mechanism that can be used towards >MSSQLServer which works also on Linux so the applications can be made >cross-platform? The database itself will of course remain on a Windows >server. > Sorry, I found this

[Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

2011-01-15 Thread Bo Berglund
I have a number of Delphi applications, which use an MSSQLServer database as backend. These applications use ADO to connect to the database. Now I am checking if these applications are possible to move over to Lazarus/FPC. I realize that I cannot just recompile them since ADO is a COM system on Wi