Board index » delphi » SQL Union access violation...
Rob Rieto
![]() Delphi Developer |
Thu, 31 Jan 2002 03:00:00 GMT
|
Rob Rieto
![]() Delphi Developer |
Thu, 31 Jan 2002 03:00:00 GMT
SQL Union access violation...
I am trying to use the sql union function and am getting a access
violation 4C5F3168 involving the IDSQL32.dll. The file input and out put for both sections of the sql are the same. They run fine independently. All I did was to take a working sql and copy it, change some of the selection parameters and add a 'sql.add('union')' statement. Any suggestions? Thanks |
Rob Rieto
![]() Delphi Developer |
Thu, 31 Jan 2002 03:00:00 GMT
Re:SQL Union access violation...It has to to with including conditional statements in the sql. When I include the following selection criteria in both sections of the union, I get the error. If I comment it out of the 'union' section, runs OK. However, I need the selection criteria in both sections. if gsRecord.gsSalesman <> '' then QuoteRob Rietow wrote: |
Brian Bushay Tea
![]() Delphi Developer |
Thu, 31 Jan 2002 03:00:00 GMT
Re:SQL Union access violation...Quote>It has to to with including conditional statements in the sql. When I -- |
Rob Rieto
![]() Delphi Developer |
Thu, 31 Jan 2002 03:00:00 GMT
Re:SQL Union access violation...Code follows: // get year budgets QuoteBrian Bushay TeamB wrote: |
Marco Klem
![]() Delphi Developer |
Fri, 01 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...Hi, QuoteRob Rietow wrote: (I've tested a new Newsreader... failed :-) I repeat me: Furthermore, why do you use an UNION statement here? You should get the same SELECT customer, grossSales, salesman Regards, |
Brian Bushay Tea
![]() Delphi Developer |
Fri, 01 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...Quote>Code follows: set parameters. Quote> if gsRecord.gsSalesman <> '' then after the two SQL Add -- |
Rob Rieto
![]() Delphi Developer |
Sun, 03 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...Are you saying that it should work? What about Marco's comment above? QuoteBrian Bushay TeamB wrote: |
Brian Bushay Tea
![]() Delphi Developer |
Mon, 04 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...Quote>Are you saying that it should work? declare working with out testing it Quote> What about Marco's comment above? query -- |
Marco Klem
![]() Delphi Developer |
Mon, 04 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...QuoteBrian Bushay TeamB wrote: You are right. Someone has told me garbage. I've tested it with the demo tables with Query1 do begin Sorry for the disorientation, Rob. Regards, |
Rob Rieto
![]() Delphi Developer |
Tue, 05 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...I have simplified the code. I should run against any table with the appropriate field and table names. Note the assignment of 'wsalesman' at the beginning of the procedure. If this is not blank, I get the error. If I make wsalesman = '' then the code runs ok. procedure TForm1.Button12Click(Sender: TObject); with Query1 do QuoteBrian Bushay TeamB wrote: |
Brian Bushay Tea
![]() Delphi Developer |
Wed, 06 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...Quote>I have simplified the code. I should run against any table with the appropriate It helps to have clear code that I can use with out a lot of work at my end. -- |
Rob Rieto
![]() Delphi Developer |
Wed, 06 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...I'm using D3. QuoteBrian Bushay TeamB wrote: |
Rob Rieto
![]() Delphi Developer |
Wed, 06 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...Also, BDE 451. QuoteBrian Bushay TeamB wrote: |
Brian Bushay Tea
![]() Delphi Developer |
Thu, 07 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...Quote>I'm using D3. for everyone. I tested with Delphi 3 and BDE 5.1 and had no problem. -- |
Rob Rieto
![]() Delphi Developer |
Fri, 08 Feb 2002 03:00:00 GMT
Re:SQL Union access violation...Yes, sorry. I get focused on what I am doing and forget there's a world out there. Appreciate the help. Installed 5.10 and it runs. Any problems going 4.xx to 5.10? QuoteBrian Bushay TeamB wrote: |
2. Union SQL Statement Generates Access Violation
3. Access Violation using UNION
4. Gigantic field size in Union SQL (Access)
5. access violations in IDAPI32 when access SQL Server
6. Access Violation with TfileStream I hate access violations
8. SQL Union clause (Local SQL)