Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS400 query

Status
Not open for further replies.

kivju

Technical User
Sep 17, 2003
10
0
0
FI
Hi !
I make Visual C++ application.
I get data in AS400.
here in database have two formats: Char and Decimal.
My question:
How i format desimal ?

CString ss="15";
int ee=79595;
m_pSet->Close();
m_pSet->m_strFilter.Format("EMPLOYER='%s'AND WRKNUMBER='%?'",ss,ee);
m_pSet->Open();

Char EMPLOYER='%s' , CString
decimal WRKNUMBER=?? , CString ?

Thanks for help
 
You have a bug (error) in your format specifier string:

m_pSet->m_strFilter.Format("EMPLOYER='%s'AND WRKNUMBER='%[red]d[/red]?'",ss,ee);


-pete
 
Hi Pete !

I put '?' because this is my question , i try '%d' and this give error.

thanks
 
I solve this problem:

m_pSet->m_strFilter.Format("EMPLOYER='%s'AND WRKNUMBER=%s ",ss,ee);

No this "'" !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top