COMPILE ERROR - ULSqlca: error C2146, error C2501!

Hi,



I've been struggeling with this problem for some days now :(

I truely hope that someone can help out!



This is the erorr I get when I try to compile a project for a Pocket PC 2002
(wince 3.0) with eVC++



C:\Tutorial\TestProject2\customer.cpp(10) : error C2146: syntax error :
missing ';' before identifier 'Sqlca'

C:\Tutorial\TestProject2\customer.cpp(10) : error C2501: 'UlSqlca' : missing
storage-class or type specifiers

C:\Tutorial\TestProject2\customer.cpp(10) : fatal error C1004: unexpected
end of file found



This is what is given in the customer.cpp (It's from an example in
"Ultralite C++ User's Guide.pdf")



#include "uliface.h"
#include <stdio.h>
#include <tchar.h>

using namespace UltraLite;

#define MAX_NAME_LEN 100



UlSqlca Sqlca;    <------------ THIS IS CAUSING THE PROBLEM!



static ul_char const * ConnectionParms = UL_TEXT( "uid=dba;pwd=sql" )
                                                              UL_TEXT(
";dbf=tutcustomer.udb" )
                                                              UL_TEXT(
";schema_file=tutcustomer.usm" );

static void handle_error( ul_char const * context )
{
    // here goes the code!
}

// the rest of the file





I think the problem has something to do with project settings and
configuration!

I've tried to compile using both a makefile, and a wizard based dialog
project, i.e. configure the projet via project->settings.

But I haven't managed to make this problem go away.

I do get the same problem no matter which approach I use for compiling!



I would really appreciate any kind of help that would shed some light on my
problem.



Regards

/Ali



0
Ali
2/1/2004 9:32:18 PM
sybase.sqlanywhere.ultralite 2982 articles. 0 followers. Follow

3 Replies
965 Views

Similar Articles

[PageSpeed] 34

Try ULSqlca... I think it's case sensitive, and if that works then the
docs need fixing :)

Have a look at the sample code in the folder C:\Program
Files\Sybase\SQL Anywhere 9\Samples\UltraLite\ulsqlsamp

And also look at uliface.h where it's defined as 

   class UL_CLS_SPEC UL_SRV_EXPORT ULSqlca

Breck "Loves" C Too :)

On 1 Feb 2004 13:32:18 -0800, "Ali" <it2kaal@ituniv.se> wrote:

>
>Hi,
>
>
>
>I've been struggeling with this problem for some days now :(
>
>I truely hope that someone can help out!
>
>
>
>This is the erorr I get when I try to compile a project for a Pocket PC 2002
>(wince 3.0) with eVC++
>
>
>
>C:\Tutorial\TestProject2\customer.cpp(10) : error C2146: syntax error :
>missing ';' before identifier 'Sqlca'
>
>C:\Tutorial\TestProject2\customer.cpp(10) : error C2501: 'UlSqlca' : missing
>storage-class or type specifiers
>
>C:\Tutorial\TestProject2\customer.cpp(10) : fatal error C1004: unexpected
>end of file found
>
>
>
>This is what is given in the customer.cpp (It's from an example in
>"Ultralite C++ User's Guide.pdf")
>
>
>
>#include "uliface.h"
>#include <stdio.h>
>#include <tchar.h>
>
>using namespace UltraLite;
>
>#define MAX_NAME_LEN 100
>
>
>
>UlSqlca Sqlca;    <------------ THIS IS CAUSING THE PROBLEM!
>
>
>
>static ul_char const * ConnectionParms = UL_TEXT( "uid=dba;pwd=sql" )
>                                                              UL_TEXT(
>";dbf=tutcustomer.udb" )
>                                                              UL_TEXT(
>";schema_file=tutcustomer.usm" );
>
>static void handle_error( ul_char const * context )
>{
>    // here goes the code!
>}
>
>// the rest of the file
>
>
>
>
>
>I think the problem has something to do with project settings and
>configuration!
>
>I've tried to compile using both a makefile, and a wizard based dialog
>project, i.e. configure the projet via project->settings.
>
>But I haven't managed to make this problem go away.
>
>I do get the same problem no matter which approach I use for compiling!
>
>
>
>I would really appreciate any kind of help that would shed some light on my
>problem.
>
>
>
>Regards
>
>/Ali
>
>

--
bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com
0
Breck
2/1/2004 10:46:16 PM
Mr. Carter,

Thank you for your help. The problem was just as you described it.
I can't believe that I did not see the problem (i.e. ULSqlca instead of
UlSqlca)!
Anyway, now I can compile the project without any problems.

This was my first try to use Sybase Ultralite for pocket pc 2002/wince.
What I actually need to do is to use Ultralite database in my MFC
application. Are there
anything particular that I should konw about? E.g. special configuration for
MFC?
Or will it work as painless as other kind of class inclusion in an existing
project? (what I
will do is to create a class for handling the database communication, i.e. a
CDatabaseMangager)

Regards
/Ali


"Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com> wrote in
message news:ntuq10tesa9jsm2qlqhd52unbnp5spnt3o@4ax.com...
> Try ULSqlca... I think it's case sensitive, and if that works then the
> docs need fixing :)
>
> Have a look at the sample code in the folder C:\Program
> Files\Sybase\SQL Anywhere 9\Samples\UltraLite\ulsqlsamp
>
> And also look at uliface.h where it's defined as
>
>    class UL_CLS_SPEC UL_SRV_EXPORT ULSqlca
>
> Breck "Loves" C Too :)
>
> On 1 Feb 2004 13:32:18 -0800, "Ali" <it2kaal@ituniv.se> wrote:
>
> >
> >Hi,
> >
> >
> >
> >I've been struggeling with this problem for some days now :(
> >
> >I truely hope that someone can help out!
> >
> >
> >
> >This is the erorr I get when I try to compile a project for a Pocket PC
2002
> >(wince 3.0) with eVC++
> >
> >
> >
> >C:\Tutorial\TestProject2\customer.cpp(10) : error C2146: syntax error :
> >missing ';' before identifier 'Sqlca'
> >
> >C:\Tutorial\TestProject2\customer.cpp(10) : error C2501: 'UlSqlca' :
missing
> >storage-class or type specifiers
> >
> >C:\Tutorial\TestProject2\customer.cpp(10) : fatal error C1004: unexpected
> >end of file found
> >
> >
> >
> >This is what is given in the customer.cpp (It's from an example in
> >"Ultralite C++ User's Guide.pdf")
> >
> >
> >
> >#include "uliface.h"
> >#include <stdio.h>
> >#include <tchar.h>
> >
> >using namespace UltraLite;
> >
> >#define MAX_NAME_LEN 100
> >
> >
> >
> >UlSqlca Sqlca;    <------------ THIS IS CAUSING THE PROBLEM!
> >
> >
> >
> >static ul_char const * ConnectionParms = UL_TEXT( "uid=dba;pwd=sql" )
> >                                                              UL_TEXT(
> >";dbf=tutcustomer.udb" )
> >                                                              UL_TEXT(
> >";schema_file=tutcustomer.usm" );
> >
> >static void handle_error( ul_char const * context )
> >{
> >    // here goes the code!
> >}
> >
> >// the rest of the file
> >
> >
> >
> >
> >
> >I think the problem has something to do with project settings and
> >configuration!
> >
> >I've tried to compile using both a makefile, and a wizard based dialog
> >project, i.e. configure the projet via project->settings.
> >
> >But I haven't managed to make this problem go away.
> >
> >I do get the same problem no matter which approach I use for compiling!
> >
> >
> >
> >I would really appreciate any kind of help that would shed some light on
my
> >problem.
> >
> >
> >
> >Regards
> >
> >/Ali
> >
> >
>
> --
> bcarter@risingroad.com
> Mobile and Distributed Enterprise Database Applications
> www.risingroad.com


0
Ali
2/2/2004 9:37:30 AM
Don't feel bad, you were relying on an incorrect snippet of code in
the documentation.

I don't have an answer to your new question. Please post it in a new
message so that other folks will pay attention to it; busy folks
sometimes don't read replies.

Breck

On 2 Feb 2004 01:37:30 -0800, "Ali" <it2kaal@ituniv.se> wrote:

>Mr. Carter,
>
>Thank you for your help. The problem was just as you described it.
>I can't believe that I did not see the problem (i.e. ULSqlca instead of
>UlSqlca)!
>Anyway, now I can compile the project without any problems.
>
>This was my first try to use Sybase Ultralite for pocket pc 2002/wince.
>What I actually need to do is to use Ultralite database in my MFC
>application. Are there
>anything particular that I should konw about? E.g. special configuration for
>MFC?
>Or will it work as painless as other kind of class inclusion in an existing
>project? (what I
>will do is to create a class for handling the database communication, i.e. a
>CDatabaseMangager)
>
>Regards
>/Ali
>
>
>"Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com> wrote in
>message news:ntuq10tesa9jsm2qlqhd52unbnp5spnt3o@4ax.com...
>> Try ULSqlca... I think it's case sensitive, and if that works then the
>> docs need fixing :)
>>
>> Have a look at the sample code in the folder C:\Program
>> Files\Sybase\SQL Anywhere 9\Samples\UltraLite\ulsqlsamp
>>
>> And also look at uliface.h where it's defined as
>>
>>    class UL_CLS_SPEC UL_SRV_EXPORT ULSqlca
>>
>> Breck "Loves" C Too :)
>>
>> On 1 Feb 2004 13:32:18 -0800, "Ali" <it2kaal@ituniv.se> wrote:
>>
>> >
>> >Hi,
>> >
>> >
>> >
>> >I've been struggeling with this problem for some days now :(
>> >
>> >I truely hope that someone can help out!
>> >
>> >
>> >
>> >This is the erorr I get when I try to compile a project for a Pocket PC
>2002
>> >(wince 3.0) with eVC++
>> >
>> >
>> >
>> >C:\Tutorial\TestProject2\customer.cpp(10) : error C2146: syntax error :
>> >missing ';' before identifier 'Sqlca'
>> >
>> >C:\Tutorial\TestProject2\customer.cpp(10) : error C2501: 'UlSqlca' :
>missing
>> >storage-class or type specifiers
>> >
>> >C:\Tutorial\TestProject2\customer.cpp(10) : fatal error C1004: unexpected
>> >end of file found
>> >
>> >
>> >
>> >This is what is given in the customer.cpp (It's from an example in
>> >"Ultralite C++ User's Guide.pdf")
>> >
>> >
>> >
>> >#include "uliface.h"
>> >#include <stdio.h>
>> >#include <tchar.h>
>> >
>> >using namespace UltraLite;
>> >
>> >#define MAX_NAME_LEN 100
>> >
>> >
>> >
>> >UlSqlca Sqlca;    <------------ THIS IS CAUSING THE PROBLEM!
>> >
>> >
>> >
>> >static ul_char const * ConnectionParms = UL_TEXT( "uid=dba;pwd=sql" )
>> >                                                              UL_TEXT(
>> >";dbf=tutcustomer.udb" )
>> >                                                              UL_TEXT(
>> >";schema_file=tutcustomer.usm" );
>> >
>> >static void handle_error( ul_char const * context )
>> >{
>> >    // here goes the code!
>> >}
>> >
>> >// the rest of the file
>> >
>> >
>> >
>> >
>> >
>> >I think the problem has something to do with project settings and
>> >configuration!
>> >
>> >I've tried to compile using both a makefile, and a wizard based dialog
>> >project, i.e. configure the projet via project->settings.
>> >
>> >But I haven't managed to make this problem go away.
>> >
>> >I do get the same problem no matter which approach I use for compiling!
>> >
>> >
>> >
>> >I would really appreciate any kind of help that would shed some light on
>my
>> >problem.
>> >
>> >
>> >
>> >Regards
>> >
>> >/Ali
>> >
>> >
>>
>> --
>> bcarter@risingroad.com
>> Mobile and Distributed Enterprise Database Applications
>> www.risingroad.com
>

--
bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com
0
Breck
2/2/2004 11:43:07 AM
Reply:

Similar Artilces:

errors errors errors..
Name: harun Email: harunbjk1903hrnatgmaildotcom Product: Firefox Summary: errors errors errors.. Comments: first of all when i launch firefox (3) i cant enter websites via writing.. for example when I type "google" and then press ctrl and enter, it crashes.. and i take lots of error reports. firefox 2 was better.. see you again , harun Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9) Gecko/2008052906 Firefox/3.0 From URL: http://hendrix.mozilla.org/ ...

Error, Error and more errors
Okay, all I wanted to do was test this app out and it has been a nightmare. 1.) Didn't install the sql database. I had to manually install it. 2.) I get errors when trying to add a picture to an album. "Procedure or function ngUpdatePicture has too many arguments specified" Any ideas? I've gotten more errors than this, but there is no use in bitchin. Are you using the v1.6.1 installer? Also, did you select to install the SQL Server db and give it a valid admin login? What were some of the error messages? Did you have an existing DB from a previous install? ...

error error error
These are the 2 new errors i am getting now:   1).  Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.Source Error: Line 53: ...

Error error error, help me
Hello, How do I populate a drop down list in asp.net from a database? I have a block of vbscript code that does the server side coding for it. My code is as follows.. <script language="vb" runat="server"> Dim objConn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\data\employee.mdb;") Dim Sql, valEmp As String Dim objDREmp as OleDbDataReader Sub FillEmployeeName(sender As Object, e As System.EventArgs) Sql = "select * from [Employee]" Dim objCommand As Ole...

error error !
Full Message: ERROR{} Additional Information: None Severity: Error Date: November 14, 2007 11:42:35 AM Acknowledged Date: None Source: /Devices/Workstations/b2305dsyldes-58 Message ID: ERROR Probable Cause URL: None Log ID: ac4f2a9dbea6435421f4d9f92db8e971 Related Objects: None What does this means ? Marc-Andre, no idea, maybe a little more background information would help? -- Shaun Pond well, nothing special to say, some DLU policy, 1 remote policy, that's about it.......... Shaun Pond wrote: > Marc-Andre, > > no idea, maybe a little m...

Error or not error?
Hi gurus, hope you can help me with this problem: OS: Solaris 7 ASE: 12.5 I recently got some strange error messages when doing dbcc tablealloc with fix: *************************************************************** TABLE: hence_meaning OBJID = 100192376 INDID=0 FIRST=1817 ROOT=401935 SORT=0 INDID=2 FIRST=2882 ROOT=2881 SORT=1 Table Corrupt: Attempted to get page 330126, object 100192376; got page 0, object 0. Table Corrupt: Attempted to get page 272316, object 100192376; got page 0, object 0. Table Corrupt: Attempted to get page 322961, object 100192376; got p...

error after error
Hello, All I seem to be getting an error I don't quite understand. Can someone point out why I'm geeting this error? The first error states: unquoted string "subroutines" may clash with future reserved word at NPtest.pl line 6. after I quote "subroutines" I get an error that states: syntax error at NPtest.pl line 6, near "require" Execution of NPtest.pl aborted due to compilation errors. Heres the first script: #!/usr/bin/perl # NEWPACKAGE.pl package NEWPACKAGE sub printing1 {print "duh duh duh.\n&quo...

No errors before compile, errors after compile
I haven't seen anyone mention this problem so I'm hoping that it's something simple. When I compile my 6.5 ent app to exe & pbds I get errors that do not exist before the compile, and if I take a pbl (often not even the pbl with the offending code) and move it into the exe sometimes the errors go away. I have optimized and done a full rebuild. This obviously makes no sense I hope someone else has experienced this. The errors are usually null objects. My system is win95 with 128mb ram. Thanks in advance. Shawn Davis Shawn, One of the best things to do i...

CIFs Error: Storage Error Unknown error with error code: -602
Server was an Identity Migration target (source single server tree nw6sp5/edir8737/gw8hp1 to oes2sp1x64+latest patches), but I have been having problems with getting cifs to work since the migration. Whenever I go into iManager, file protocols, cifs & try to make any change other than stopping/starting the service I get the error in the subject (even to change something simple like the comment). Other oddities I noticed since the actual IM swap that somehow might have something to do with this: users arent LUM enabled or so it seems the afpProxyUser- & cifsProxyUser- both...

Server Error: Compilation Error
I've been developing a site in visual studio 2005.  It works fine there, and it works fine when I put it in a local IIS virtual directory.  When I upload it to my webhost I get an error.   Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1646: Keyword, identifier, or string expected after verbatim specifier: @Source Error: Line 1: <%@ Page Language="C#" MasterPageFile=&...

Error trying to compile
I have an mdi application which runs fine in the development environment. I have also opened each menu item script and compiled it in the painter without any errors. When I try to compile my application I get the following error message and the copmile ends unsuccessfully: Library: c:\pwrs\clue\clue_app.pbl Object: m_mdi_frame Forward Declarations (0008): Error C0031: Syntax error Does anyone know why I am getting this error and how to correct it? Thanks Gene On Mon, 28 Jul 1997 08:14:02 -0400, in powersoft.public.powerbuilder.powerscript ...

Delpi XE2 compile error [DCC Fatal Error] F2084 Internal Error:
Hi, I am getting the following error when compiling a project ( 32 bit vcl ) It doesn't happen that often and it I can't remember a case when it was repeatable. I have recorded the following messages when a compile fails... [DCC Fatal Error] F2084 Internal Error: AV0A639D73-R0000000C-0 [DCC Fatal Error] F2084 Internal Error: AV09909D73-R0000000C-0 I usually just recompile and it works without errors. So I can't reproduce it. But this along with some other strange run time errors that are also not repeatable have me concerned. Unfortunately I haven't documented...

Parser error or Dataset Error or Namespace Error
I am new to ASP.NET and I am currently learning to use the VS 2005 Express tools. I've been able to get along smoothly for sometime; getting bugs and resolving them from your very valuable posts in this forum. Now I have a problem that I have no idea where to begin to resolve the problem. It appears to be a Parser Error, but then when I try to view my pages, I get a lot of other apparently related errors. I am suspecting that I have, one way or the other, messed up my dataset schema definition. The strange thing about this error is that I cannot open any other pages anymore. Even those simp...

Build errors message but no errors in Error List
I am using VB.Net in Visual Web Developer Express. When I press F5 to run my application I get the 'There were build errors. Wouild you like to continue and run the last successful build?' message. I select 'No', and,  if the Error List window was shut it opens, but there are no errors listed in it. I'm sure this has worked before. Is there another way of finding errors? According to Help | About I am using version 8.0.50727.42. Thanks for any help.  One of the things with the error window is you can selectively display errors, warnings and messages.  I...

[ILINK32 Error] Error: Error processing module
Hi! I have this error when trying to build a project of mine, using XE2 Update4: {code} [ILINK32 Error] Error: Error processing module [ILINK32 Error] Error: Unable to perform link {code} The project uses some source files from another project that is maintained by a different developer. Since I did an update on those files, I get this message. Whenever I restore the files, build is successful, so it is pretty obvious that something changed in those files that makes linking unsuccessful. But how can I track down which file is the one (out from around 100)? Regarding to the he...