yana sam

yana sam

  • NA
  • 10
  • 0

Need some help in this coding !!!

Mar 31 2008 8:48 PM
Hello,

I’m just started using vb.net.The program is about replication.I need some help in the coding below.

 

SQL = "INSERT INTO b_CODATxn(sIC,sSemester,sSeqNo,iTxnLineID,iLineID,dTxnDate,sTxnType,sAccNo, iDrCrInd,mAmt,sDesc,sFeeCode,iRecur,dProcessDate," + _

" iID,sModFlag,sPostUser, iPeriod,iYear,mAmtPart ,sDepositSlip,sDoccode,sDocnum,sPayMode,sLinkcode,sComments,iLinkRunNo,iJournal,dDocDate) VALUES " + _

"('" + myarray(i, 0) + "','" + myarray(i, 1) + "','" + myarray(i, 2) + "','" + myarray(i, 3) + "','" + myarray(i, 4) + _

"','" + myarray(i, 5) + "','" + myarray(i, 6) + "','" + myarray(i, 7) + "','" + myarray(i, 8) + "','" + myarray(i, 9) + _

"','" + myarray(i, 10) + "','" + myarray(i, 11) + "','" + myarray(i, 12) + "','" + myarray(i, 13) + "','" + myarray(i, 14) + _

"','" + myarray(i, 15) + "','" + myarray(i, 16) + "','" + myarray(i, 17) + "','" + myarray(i, 18) + "','" + myarray(i, 19) + _

"','" + myarray(i, 20) + "','" + myarray(i, 21) + "','" + myarray(i, 22) + "','" + myarray(i, 23) + "','" + myarray(i, 24) + _

"','" + myarray(i, 25) + "','" + myarray(i, 26) + "','" + myarray(i, 27) + "','" + myarray(i, 28) + "')"

 

After the execution this error will appear!!!

System.data.OdbcException:ERROR[22018][ODBC Sybase Wire Protocol driver][SQL Server]Implicit conversion  from datatype 'VARCHAR' to 'INT' is not allowed.Use the CONVERT function to run this query.

ERROR[22018][ODBC Sybase Wire Protocol driver][SQL Server]Implicit conversion from datatype 'VARCHAR' to 'SMALLINT' is not allowed.Use the CONVERT function to run this query.

ERROR[22018][ODBC Sybase Wire Protocol driver][SQL Server]Implicit conversion from datatype 'VARCHAR' to 'NUMERIC' is not allowed.Use the CONVERT function to run this query.

ERROR[22018][ODBC Sybase Wire Protocol driver][SQL Server]Implicit conversion from datatype 'VARCHAR' to 'MONEY' is not allowed.Use the CONVERT function to run this query.

ERROR[22018][ODBC Sybase Wire Protocol driver][SQL Server]Arithmetic overflow during implicit conversion of VARCHAR value '13/03/2008' to a DATETIME field.

 

 


Answers (5)