none
strange problems in ODBC interface

    Question

  • i have 3 copies of the same Db with the saame tables created with the same stored procedure in reference DB

    the  ODBC interface is made thru the same recordset derived class

    the dbschema is 

    CREATE TABLE dbo.dizionario
    
    (
    
    ID_ASS bigint NOT NULL constraint PK_DIZ primary key,
    
    lingua int not null constraint FK_DIZ 
    
    parola nvarchar(150) NOT NULL ,
    
    tabfless int not null  ,
    
    locuzione tinyint,
    
    grstring binary(25) NOT NULL
    
    )  ON [PRIMARY]
    

    the writing end  of Insert and deserialize methods is

     
    LONGLONG Crecdizionario::TerminaInsert(void)
    {
    CString l_csq2;
    //this->m_ID_ABS=(LONGLONG) 0;
    this->m_ID_ASS=abs(this->m_ID_ASS);
    try
    	{
    	this->m_strFilter.Format(L"ID_ASS=%I64d",this->m_ID_ASS);
    	this->Update();
    
    a_memtracker.WriteString(L"update\r\n");
    this->Dumpgrstring();
    
    	this->Requery();
    
    /*a_memtracker.WriteString(L"requery\r\n");
    this->Dumpgrstring();
    a_memtracker.Close();
    exit(-9);*/
    	}

    the problems are on the binary field

    in two of the databases what i get out of this dump is  exactly equal  to what i read after requery  i.e.

    0 -- 01{01}
    1 -- 0a{0a}
    2 -- ff{ff}
    3 -- ff{ff}
    4 -- ff{ff}
    5 -- ff{ff}
    6 -- ff{ff}
    7 -- ff{ff}
    8 -- 01{01}
    9 -- 00{00}
    10 -- 00{00}
    11 -- 00{00}
    12 -- 00{00}
    13 -- 00{00}
    14 -- 00{00}
    

    in the third after requery i can get different things like e.g.

    0 -- ee{ee}
    1 -- fe{fe}
    2 -- ee{ee}
    3 -- fe{fe}
    4 -- ee{ee}
    5 -- fe{fe}
    6 -- ee{ee}
    7 -- fe{fe}
    8 -- ee{ee}
    9 -- fe{fe}
    10 -- ee{ee}
    11 -- fe{fe}
    12 -- ee{ee}
    13 -- fe{fe}
    14 -- ee{ee}

    to make this worse the error happens sparcely only on the first row inserted in the DB in the remaining rows all is perfect [ i inserted about 30 different row with the same program  then i stopped ]

    does anyone know where i could look at  to find what happens in this only mysterious case ??

    a list f the first 10-15 lines are avaliable if needed




    claudio cannella

    Friday, April 29, 2016 1:24 PM

All replies

  • Hi claudio canella,

    This forum is discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    Could you please tell us what's the database are you using? I will help you find out which forum is more appropriate and move your thread to the appropriate forum for a better help. Thanks for your understanding.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 2, 2016 5:21 AM
    Moderator