Re: Application crashes on CString.Format() call
- From: "DavidCrow" <david.crow@xxxxxxxxxx>
- Date: 1 Dec 2005 07:32:03 -0800
Have you stepped into the CString::Format() call to see why it crashes?
That'll give you a big clue as to what's wrong.
prashant_mandhare04@xxxxxxxxx wrote:
> Hi all,
>
> I have a VC6 application which crashes at following 2 code locations
> frequently (not every time) -
>
> location - 1
> ==========
> sSql.Format("INSERT INTO POSITIONREP (CARTRACKERID,POSITIONLAT,
> POSITIONLONG,FRAMETIMESTAMP,UPDATEDDATETIME,SPEED,
> HEADING,HEIGHT,HDOP,DRIVERID)"
> " VALUES ('%s','%lf','%lf','%s','%s','%lf','%lf','%lf','%d','%s')",
> StringToSQL(GprsPosData.ID), //this fun returns CString
> GprsPosData.Position.lat, //double
> GprsPosData.Position.lng, //double
> sFrameDate, //CString
> sUpdateDate, //CString
> GprsPosData.speed, //double
> dHeading, //double
> GprsPosData.Height* 100000, //double
> GprsPosData.HDOP, //int
> sDriverID); //CString
>
> location -2
> ==========
> sSqlQry.Format ("INSERT INTO TripPoints ("PntID, TRIPKEY, PntLat,
> PntLong, "
> " PntSpeed, PntDateTime, PntHeight, PntCourse, PntHDOP)"
> " VALUES ('%s', '%s', %s, %s, %s, %s, %s, %s, %s) " ,
> sPntID , sTripKey, row[0], row[1], row[2], sPtDate, row[5], row[6],
> row[7]);
> // (all parameters to Format() are CString type)
>
>
> Can anybody please clear me what exactly can go wrong with Format()
> method of CString above.
> Are there any known bugs/issues related to CString::Fromat() ?
>
> Thanks in advance!
.
- References:
- Application crashes on CString.Format() call
- From: prashant_mandhare04
- Application crashes on CString.Format() call
- Prev by Date: Re: MFC future?
- Next by Date: Re: Application crashes on CString.Format() call
- Previous by thread: Re: Application crashes on CString.Format() call
- Next by thread: Re: Application crashes on CString.Format() call
- Index(es):
Relevant Pages
|