Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

C++ API can't get data

2 posts in General Discussion Last posting was on 2002-09-19 19:41:40.0Z
jnorman Posted on 2002-09-18 19:25:37.0Z
From: jnorman
Date: Wed, 18 Sep 2002 15:25:37 -0400
Newsgroups: ianywhere.public.general
Subject: C++ API can't get data
Message-ID: <CE16667384E91897006AB75585256C38.006AB77C85256C38@webforums>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:606
Article PK: 2424

I'm trying to run a simple test of creating an Ultralite DB, and using the
C++API for embedded Visual C++ 3.0. I'm writing this application for a
WinCE 3.01 PDA. I can create records in the DB, and can verify that they
exist, but when I try to print the TCHAR data, I just get blanks.

Example Code:
db.Open() ;
if( !conn.Open( &db, UL_TEXT( "dba" ), UL_TEXT( "sql" ) ) ){
printf( "Connection failed.\n" );
}
namesTable.Open( &conn );

namesTable.SetFNAME( UL_TEXT("casey"), 5 );
namesTable.SetLNAME( UL_TEXT("gerstle"), 7 );
namesTable.Insert();
conn.Commit();
namesTable.BeforeFirst();

while(namesTable.Next())
{

namesTable.GetFNAME(&fname,len,&testIsNull);
i++;
m.Format(_T("%i"),len);
//m_static.SetWindowText((unsigned short (len)));
m_static.SetWindowText(&fname);


}


Shuchit Velkar Posted on 2002-09-19 19:41:40.0Z
Subject: Re: C++ API can't get data
From: Shuchit Velkar <svelkarNO@SPAMsybase.com>
References: <CE16667384E91897006AB75585256C38.006AB77C85256C38@webforums>
Message-ID: <Xns928E9D46B3741svelkarNOsybaseSPAMc@199.93.177.77>
User-Agent: Xnews/5.04.25
Newsgroups: ianywhere.public.general
Date: Thu, 19 Sep 2002 15:41:40 -0400
Lines: 35
NNTP-Posting-Host: 172.31.141.185
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:604
Article PK: 2422

I have replied to your post in sybase.public.sqlanywhere.ultralite
Please do not cross-post.

--
Shuchit Velkar
iAnywhere Solutions
Professional Services
Please only post to the newsgroup

EBFs and Whitepapers
http://www.ianywhere.com/developer


jnorman wrote in
news:CE16667384E91897006AB75585256C38.006AB77C85256C38@webforums:

> I'm trying to run a simple test of creating an Ultralite DB, and using
> the C++API for embedded Visual C++ 3.0. I'm writing this application
> for a WinCE 3.01 PDA. I can create records in the DB, and can verify
> that they exist, but when I try to print the TCHAR data, I just get
> blanks.
>
> Example Code:
> db.Open() ;
> if( !conn.Open( &db, UL_TEXT( "dba" ), UL_TEXT( "sql" ) ) ){
> printf( "Connection failed.\n" );
> }
> namesTable.Open( &conn );
>
> namesTable.SetFNAME( UL_TEXT("casey"), 5 );
> namesTable.SetLNAME( UL_TEXT("gerstle"), 7 );
> namesTable.Insert();
> conn.Commit();
> namesTable.BeforeFirst();
>
> while(namesTable.Next())
> {
>
> namesTable.GetFNAME(&fname,len,&testIsNull);
> i++;
> m.Format(_T("%i"),len);
> //m_static.SetWindowText((unsigned short (len)));
> m_static.SetWindowText(&fname);
>
>
> }