Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread ODBC ver 3 error in VS 2008
Tue, Aug 10 2010 10:28 AMPermanent Link

jframe

I'm trying to execute an update statement via the odbc driver for a blob record in DBISAM v 3, but I'm getting a error:

cmd = New OdbcCommand("UPDATE LOCAT SET CONGRESS = :Congress WHERE WSN = 1", conn)
       Dim P As OdbcParameter = New OdbcParameter(":Congress", OdbcType.VarBinary, bTest.Length, ParameterDirection.Input, False, 0, 0, Nothing, DataRowVersion.Current, bTest)
       cmd.Parameters.Add(P)
       cmd.ExecuteNonQuery()

System.Data.Odbc.OdbcException was unhandled
 ErrorCode=-2146232009
 Message="ERROR [HY000] [Elevate Software][DBISAM Database System] DBISAM Engine Error # 11949 SQL error - Unknown or unexpected symbol ':' found in value expression"

Any suggestions?
Tue, Aug 10 2010 4:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< I'm trying to execute an update statement via the odbc driver for a blob
record in DBISAM v 3, but I'm getting a error:

cmd = New OdbcCommand("UPDATE LOCAT SET CONGRESS = :Congress WHERE WSN =
1", conn)
       Dim P As OdbcParameter = New OdbcParameter(":Congress",
OdbcType.VarBinary, bTest.Length, ParameterDirection.Input, False, 0, 0,
Nothing, DataRowVersion.Current, bTest)
       cmd.Parameters.Add(P)
       cmd.ExecuteNonQuery()

System.Data.Odbc.OdbcException was unhandled
 ErrorCode=-2146232009
 Message="ERROR [HY000] [Elevate Software][DBISAM Database System] DBISAM
Engine Error # 11949 SQL error - Unknown or unexpected symbol ':' found in
value expression" >>

You need to use ? for parameters with ODBC.  The ODBC.NET data provider does
not support named parameters in the form of :Param.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image