Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Microsoft Visual Studio 2005 and DBISAM SQL QUERY
Tue, Sep 20 2011 10:47 AMPermanent Link

lrsgk35

I am trying to build the following SQL query in Visual Studio 2005 BI,

SELECT * FROM awpephne
WHERE Family_Number = ?
AND Individual_Number = ?
AND Description IN
(SELECT Label FROM awpelabl
WHERE Label_Type = 'Preferred E-mail'
AND (Family_Number = ? )
AND (Individual_Number = ? ) )

Individual_Number is a integer.  Family_Number is a string.  What is the correct SQL statement to pass a integer into the DBISAM SQL statement?


I am getting an error in Visual Studio that says:

TITLE: Microsoft Report Designer
------------------------------

An error occurred while executing the query.
ERROR [4200] [Elevate Software][DBISAM] DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Boolean, SmallInt, Word, AutoInc, Integer, LargeInt, Currency, Float, or BCD expression but instead found ? in SELECT SQL statement at line 8, column 27

------------------------------
ADDITIONAL INFORMATION:

ERROR [4200] [Elevate Software][DBISAM] DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Boolean, SmallInt, Word, AutoInc, Integer, LargeInt, Currency, Float, or BCD expression but instead found ? in SELECT SQL statement at line 8, column 27 (awodbc.dll)

------------------------------
BUTTONS:

OK
------------------------------
Fri, Sep 23 2011 3:43 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< Individual_Number is a integer.  Family_Number is a string.  What is the
correct SQL statement to pass a integer into the DBISAM SQL statement? >>

That is the correct parameterized SQL, but I would need to see your
C#/VB.NET code in order to tell you if you're passing the parameters
properly to the ODBCCommand object.  How you assign the parameter values
makes all of the difference.

--
Tim Young
Elevate Software
www.elevatesoft.com


Image