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
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
>
|||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...
> for
>
|||Make sure that each bound column is bound on an 8-byte boundary.
Are you using the ODBC Cursor Library?
Almost every time I've seen an alignment error using the SQL ODBC driver, it
is because of an application bug. If you're confident that it is a bug in
the driver, then call Microsoft PSS and request a QFE. If it is a bug in
the driver, you shouldn't be charged for it.
Make sure you have the latest MDAC too. I assume you're using MDAC 2.8 and
running on Windows Server 2003 64-bit edition. If not, let me know.
Brannon
"john" <john@.sakhr.com> wrote in message
news:eIIT5T#nEHA.592@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> 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...
ODBC[vbcol=seagreen]
the[vbcol=seagreen]
symbols
>
Showing posts with label bit. Show all posts
Showing posts with label bit. Show all posts
Tuesday, March 27, 2012
Monday, March 26, 2012
Getting started with phonetic comparisons
I've been reading a bit about full-text searches, phonetic values and match-queries and just don't know where to begin.
What I'm eventually going to do, is make procedures for matching names, finding records that are close matches and presenting them in a subform below the actual member that you look up.
E.g. if an employee looks up Sergej, he or she will also see Sergey, Sergei etc. below the membersheet.
BOL isn't very practical in examples, and its about 7 years since I took my SQL-Server 7.0 MS courses, plus I've primarily worked as an administrator up until last fall, not a developer. So where to begin?
Thanks in advance,
TrinTwo functions in this attachment.
Function COMPARETEXT() evaluates all the character pairs in two strings and returns a numeric value between 0 and 100 indicating the degree of similarity between the strings.
Function MATCHTEXT() strips vowels and non-alphanumeric characters from a string to create a "matchstring" that can be passed to COMPARETEXT for more accurate comparisons.
I have used these two functions to indentify duplicate records for ten years now. The most effective method is to create a permanent column of matchtext strings in your table, so as to prevent having to recalculate them. Then pass the string you want to compare through MATCHTEXT() prior to submitting it as a parameter to COMPARETEXT along with the data in your table.
Generally, a returned value of over 80 indicates a match. Anything between 60 and 80 is worth having a human review. Also, the process goes faster if you can first match records on some other factor, such as zip-code.|||Man, this looks positively awesome. I've been looking at different approaches, and comparetext combined with the SQL function Difference will positively do for my situation of comparing names.
Very slick and easy functions you've made there. Probably not easy to invent, but easy to understand.
Thanks a bunch. Your name resides in another sql-server installation on the world :)
Cheers, Trinsan|||Thanks a bunch. Your name resides in another sql-server installation on the world
You don't work for the CIA, I hope...
Thanks for the kudos.sql
What I'm eventually going to do, is make procedures for matching names, finding records that are close matches and presenting them in a subform below the actual member that you look up.
E.g. if an employee looks up Sergej, he or she will also see Sergey, Sergei etc. below the membersheet.
BOL isn't very practical in examples, and its about 7 years since I took my SQL-Server 7.0 MS courses, plus I've primarily worked as an administrator up until last fall, not a developer. So where to begin?
Thanks in advance,
TrinTwo functions in this attachment.
Function COMPARETEXT() evaluates all the character pairs in two strings and returns a numeric value between 0 and 100 indicating the degree of similarity between the strings.
Function MATCHTEXT() strips vowels and non-alphanumeric characters from a string to create a "matchstring" that can be passed to COMPARETEXT for more accurate comparisons.
I have used these two functions to indentify duplicate records for ten years now. The most effective method is to create a permanent column of matchtext strings in your table, so as to prevent having to recalculate them. Then pass the string you want to compare through MATCHTEXT() prior to submitting it as a parameter to COMPARETEXT along with the data in your table.
Generally, a returned value of over 80 indicates a match. Anything between 60 and 80 is worth having a human review. Also, the process goes faster if you can first match records on some other factor, such as zip-code.|||Man, this looks positively awesome. I've been looking at different approaches, and comparetext combined with the SQL function Difference will positively do for my situation of comparing names.
Very slick and easy functions you've made there. Probably not easy to invent, but easy to understand.
Thanks a bunch. Your name resides in another sql-server installation on the world :)
Cheers, Trinsan|||Thanks a bunch. Your name resides in another sql-server installation on the world
You don't work for the CIA, I hope...
Thanks for the kudos.sql
Subscribe to:
Posts (Atom)