Re: Getting tables list in 64 bit platform
From: john (john_at_sakhr.com)
Date: 09/21/04
- Previous message: Peter Arrenbrecht: "ODBC Bug in SQL Server 8?"
- In reply to: Brannon Jones: "Re: Getting tables list in 64 bit platform"
- Next in thread: Brannon Jones: "Re: Getting tables list in 64 bit platform"
- Reply: Brannon Jones: "Re: Getting tables list in 64 bit platform"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 21 Sep 2004 17:17:15 +0300
all pointres are 8 bytes aligned
here is the code i use
AFX_SQL_SYNC(::SQLGetFunctions(m_pDatabase->m_hdbc,
SQL_API_SQLTABLES,&bFunctionExists));
if (!Check(nRetCode) || !bFunctionExists)
{
if (!bFunctionExists)
TRACE(_T("SQLTables not supported\n"));
return FALSE;
}
SetState(nOpenType,NULL,readOnly);
if (!AllocHstmt())
{
return FALSE;
}
TRY
{
OnSetOptions(m_hstmt);
AllocStatusArrays();
AFX_ODBC_CALL(::SQLTables(m_hstmt,
(UCHAR FAR*)pszTableQualifier,SQL_NTS,
(UCHAR FAR*)pszTableOwner,SQL_NTS,
(UCHAR FAR*)pszTableName,SQL_NTS,
(UCHAR FAR*)pszTableType,SQL_NTS));
if (!Check(nRetCode))
{
ThrowDBException(nRetCode,m_hstmt);
}
// Allocate memory and cache info
AllocAndCacheFieldInfo();
AllocRowset();
// Fetch the first row of data
try
{
MoveNext();
}
return TRUE;
The Data misaligned exception appear in MoveNext() call
"Brannon Jones" <brannonjNOSPAM@gmail.com> wrote in message
news:eA49$xCnEHA.2340@TK2MSFTNGP11.phx.gbl...
> You have a bug. You need to make sure that any pointers passed into ODBC
> are 8-byte aligned.
>
> Let me know if you need more information.
>
> Brannon
>
> "john" <john@sakhr.com> wrote in message
> news:uUyJLPvmEHA.3464@tk2msftngp13.phx.gbl...
> > I tried to access Microsoft SQl database to get table list but i got the
> > followig error.
> >
> > bf4.a30): Data misaligned - code 80000002 (first chance)
> > First chance exceptions are reported before any exception handling.
> > This exception may be expected and handled.
> > *** ERROR: Symbol file could not be found. Defaulted to export symbols
> for
> > C:\WINDOWS\system32\SQLSRV32.dll -
> > SQLSRV32!ConfigDriverW+0x62b18:
> >
> >
> >
> > p[lease advise
> >
> >
>
- Previous message: Peter Arrenbrecht: "ODBC Bug in SQL Server 8?"
- In reply to: Brannon Jones: "Re: Getting tables list in 64 bit platform"
- Next in thread: Brannon Jones: "Re: Getting tables list in 64 bit platform"
- Reply: Brannon Jones: "Re: Getting tables list in 64 bit platform"
- Messages sorted by: [ date ] [ thread ]