MSSQL EXPRESS NativeError : 3621

MSSQL EXPRESS NativeError : 3621

Postby mauri.menabue » Wed Mar 17, 2021 4:31 pm

Hi all

I tried to import a .dbf file to a SQLEXPRESS server version 2019 but this error happens: 'NATIVEERROR : 3621',
it seems to me that the problem stems from the conversion of the fields of type : 'DATE' to 'DATETIME' in fact changing
the code of line 1010 of the PRG ADOFUNCS. PRG in this way

case 'D'
if snDbms == DB_MSSQL
1010 cSql += " DateTime" // Date dataype not compat with older servers <----------Original---------------------
// Even with latest providers there are some issues in usage
else
cSql += " DATE"
endif
exit

case 'D'
if snDbms == DB_MSSQL
1010 cSql += " DATE" // Date dataype not compat with older servers <--------------Changed-----------------
// Even with latest providers there are some issues in usage
else
cSql += " DATE"
endif
exit

the import of the dbf file takes place regularly, I report the source that I used to carry out the import.

Code: Select all  Expand view

#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oCn, oRs, lOk

   MsgRun( "Connecting to MSSQL Cloud Server", FWVERSION, { || ;
      oCn := FW_OpenAdoConnection( { "MSSQL", "127.0.0.1", "tempdb", "Sa", "Mena" }, .T. ) ;
      } )

   if oCn == nil
      ? "Connect Fail"
      return nil
   else
      ? "Connected"
   endif

   // Drop the tables if exists
   TRY
      oCn:Execute( "DROP TABLE SCADENZARIO" )
   CATCH
   END
   //
   MsgRun( "Importing DBF to MSSQL", FWVERSION, { || ;
      lOK := FW_AdoImportFromDBF( oCn, "SCADENZARIO.DBF" ) ;
      } )
   if lOK
      oRs   := FW_OpenRecordSet( oCn, "SCADENZARIO" )
      XBROWSER oRs
   else
      ? "Import Fail"
   endif

   oCn:Close()

return nil
 


How can you solve the problem

Thanks
Maurizio Menabue
User avatar
mauri.menabue
 
Posts: 146
Joined: Thu Apr 17, 2008 2:38 pm

Re: MSSQL EXPRESS NativeError : 3621

Postby nageswaragunupudi » Thu Mar 18, 2021 4:29 am

We will check with SQLEXPRESS 2019 or later once again.
But we are pretty sure that if we adopt your modification, 99% of servers will fail.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests