|
#1
|
|||
|
|||
|
I am having probles making a simple application work on CBuilder 2006. I
have a form with Nexus components: TnxWinsockTransport TnxRemoteServerEngine TnxSession TnxQuery When I make all the components Active at design time I get a error that the nxQuery1->SQL is empty. When I do not do that and try to set the SQL property at run time, I get an EAccess error. I know I am overlooking something very simple. Thanks, Bill |
|
#2
|
|||
|
|||
|
I have an application that I have constructed in both CBuilder6 and
CBuilder2006. The application compiles and runs in Cbuilder6. It compiles but will not run in CBuilder2006. The NexusDB2 components are exactly the same in both CBuilder6 and CBuilder2006. This includes all property settings. These components are: TnxWinsockTransport TnxRemoteServerEngine TnxSession TnxQuery This is the code: AnsiString ThisSQL; nxQuery1->SQL->Clear(); ThisSQL = "CREATE INDEX NUM3 ON PowerBallNums ("; ThisSQL += "WB1 ASC, WB2 ASC)"; nxQuery1->SQL->Add(ThisSQL); nxQuery1->Prepare(); nxQuery1->Open(); nxQuery1->Unprepare(); ShowMessage("Done"); When the line: nxQuery1->SQL->Clear(); is excuted, I get the error: Project Fan5CB2006.exe raised exception class EAccessViolation with message 'Access violation at address 00402134 in module 'Fan5CB2006.exe'. Read of address 00000000'. I have run out of ideas of how to make this work. All help will be appreciated. Thanks in advance, Bill |
|
#3
|
|||
|
|||
|
Hi William,
Are you usign the same parameters for both projects? I mean, runtime packages/library? Did you create a new project for the BCB2006 or used the old BCB6 one and imported it? Can you reproduce this with a minimal app, or it only happens with all of your code/units? Regards, -- Rodrigo Gómez [NDX] Aguascalientes, México, -6 GMT |
|
#4
|
|||
|
|||
|
Rodrigo,
> Are you usign the same parameters for both projects? I mean, runtime > packages/library? For Cbuilder6 I am using the VCL61 packages For CBuilder2006 I am using the VCL100 packages > Did you create a new project for the BCB2006 or used the old BCB6 one and > imported it? I created new applications in both cases taking care I included the same components and the same code. > Can you reproduce this with a minimal app, or it only happens with all of > your code/units? These are minimal apps with only one form with an Exit button and Run button. The run button executes this code: AnsiString ThisSQL; nxQuery1->SQL->Clear(); ThisSQL = "CREATE INDEX NUM3 ON PowerBallNums ("; ThisSQL += "WB1 ASC, WB2 ASC)"; nxQuery1->SQL->Add(ThisSQL); nxQuery1->Prepare(); nxQuery1->Open(); nxQuery1->Unprepare(); ShowMessage("Done"); I have run the CBuilder 6 app several times and the index is created properly. In the CBuilder2006 app when I set the ActiveDesignTime property to true, I am required to have a valid SQL statement in the SQL property. However I still get the error at: nxQuery1->SQL->Clear(); Thank you so very much for your help. Bill ""Rodrigo Gómez [NDX]"" <rodrigo.gomez@ndx.nexusdb.com> wrote in message news:45d76b36@wic040d.... > Hi William, > > Are you usign the same parameters for both projects? I mean, runtime > packages/library? > > Did you create a new project for the BCB2006 or used the old BCB6 one and > imported it? > > Can you reproduce this with a minimal app, or it only happens with all of > your code/units? > > Regards, > > -- > Rodrigo Gómez [NDX] > Aguascalientes, México, -6 GMT |
|
#5
|
|||
|
|||
|
Hi Bill,
Are you using nexus as runtime packages too, or embedded in your app? What happens if you don't call the Clear() before, does it run without problems? Or, if you try setting the Text property to "", instead of calling Clear? Regards, -- Rodrigo Gómez [NDX] Aguascalientes, México, -6 GMT |
|
#6
|
|||
|
|||
|
On Sat, 17 Feb 2007 18:13:42 -0600, "William E. Mahaffey"
<wmahaffeyREMOVE@CAPSsuziessoftware.com> wrote: >nxQuery1->SQL->Clear() Shouldn't you first make sure to call nxQuery1->Close() ; Just my 2 cents. Steve Sincerely, Steve JORDI (Remove the K_I_L_LSPAM from my email address) ------------------------------------------------ 1197 Prangins Email: stevejordiK_I_L_LSPAM@hotmail.com Switzerland WWW: www.sjordi.com ------------------------------------------------ Volcanoes at www.sjordi.com/volcanoes MovieDB at www.sjmoviedb.com ------------------------------------------------ |
|
#7
|
|||
|
|||
|
Rodrigo and Steve,
> Are you using nexus as runtime packages too, or embedded in your app? Same error either way. > What happens if you don't call the Clear() before, does it run without > problems? I get the error at: nxQuery1->SQL->Add(ThisSQL); > Or, if you try setting the Text property to "", instead of calling Clear? Same error as calling Clear. >Shouldn't you first make sure to call >nxQuery1->Close() ; Still get the error. Appears that I cannot access any properties of nxQuery1->SQL. Thanks, Bill ""Rodrigo Gómez [NDX]"" <rodrigo.gomez@ndx.nexusdb.com> wrote in message news:45d8c677$1@wic040d.... > Hi Bill, > > Are you using nexus as runtime packages too, or embedded in your app? > > What happens if you don't call the Clear() before, does it run without > problems? > > Or, if you try setting the Text property to "", instead of calling Clear? > > Regards, > > -- > Rodrigo Gómez [NDX] > Aguascalientes, México, -6 GMT |
|
#8
|
|||
|
|||
|
Does the error happen also when using a TnxTable, for instance? I know TnxTable doesn't
have that properties, but say, if you try to open and traverse a table using a TnxTable, does it work? Can you work with the query at designtime? For instance, if you set the SQL and put active to true, does it work? Can you see the records in a dataaware grid at design time? Are you opening the database at runtime, or it stays active since designtime? Regards, -- Rodrigo Gómez [NDX] Aguascalientes, México, -6 GMT |
|
#9
|
|||
|
|||
|
Rodrigo,
> Does the error happen also when using a TnxTable, for instance? I know > TnxTable doesn't have that properties, but say, if you try to open and > traverse a table using a TnxTable, does it work? I am not using a TnxTable or TnxDatabase. I will have to try that. My plan on the new application is to use only SQL to access the data > Can you work with the query at designtime? For instance, if you set the > SQL and put active to true, does it work? Can you see the records in a > dataaware grid at design time? If I set SQL on Query1 under Database properties to a valid query and set ActiveDesign to true, the query executes properly. I will try the grid. > Are you opening the database at runtime, or it stays active since > designtime? I never open the database. I am just using SQL to get to the data. I beleive all data access with TnxTable and TnxDatabase will work. It seems as if there is a problem in the SQL property of TnxQuery such that I cannot access it at runtime. Thanks again. Bill ""Rodrigo Gómez [NDX]"" <rodrigo.gomez@ndx.nexusdb.com> wrote in message news:45d9e208@wic040d.... > Does the error happen also when using a TnxTable, for instance? I know > TnxTable doesn't have that properties, but say, if you try to open and > traverse a table using a TnxTable, does it work? > > Can you work with the query at designtime? For instance, if you set the > SQL and put active to true, does it work? Can you see the records in a > dataaware grid at design time? > > Are you opening the database at runtime, or it stays active since > designtime? > > Regards, > > -- > Rodrigo Gómez [NDX] > Aguascalientes, México, -6 GMT |
|
#10
|
|||
|
|||
|
Uhm... that's really odd. As far as I know, you need to connect the TnxQuery to a
TnxDatabase, and this to a TnxSession, and this to a ServerEngine (Either remote or embedded) so you could do anything with it. Maybe that's what happening. What makes things odd is that in BCB6 it doesn't fail, for what you say? Are you sure you don't have any TnxDatabase, TnxSession or so in that program? Regards, -- Rodrigo Gómez [NDX] Aguascalientes, México, -6 GMT |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CBuilder 2007 linker Error? | Shane Stump | nexusdb.public.support | 4 | 10th December 2009 05:06 PM |
| Problem with CBuilder 2007 Professional... | Shane Stump | nexusdb.public.support | 14 | 2nd February 2008 05:25 AM |
| CBuilder 2007 | Ron C | nexusdb.public.support | 2 | 17th July 2007 09:23 PM |
| v2.04 Release & CBuilder | Michael Gillen | nexusdb.public.support | 5 | 6th February 2006 08:44 PM |
| CBuilder | William E. Mahaffey | Support Newsgroups | 11 | 3rd October 2003 06:08 PM |