General information
Category:
Database DAO/RDO/ODBC/ADO
>Hi everyone, I'm a new programer in VB, I have 5 years programming in VFP and now I'm trying to understand this another tool, so I'm experimenting some troubles on it.
>
>I'm trying to create an ADO Recordset and when I want to assign it source property I put an SQL Statement like this:
>
>"Select * from mytable where mytable.code = " & strcode & " and mytable.year & mytable.month >= intYear & intMonth"
>
>When I say: myrecordset.open, VB send me an error message like:
>
>"THE ODBC CONTROLLER DOESN´T HAVE SUPPORT TO THIS PROPERTIES"
>
>In fact, I only want to know how can I obtain a set of records if Ii give to the SQL Statement a range of dates.
>
>If any one can help me, I really appreciate.
>
>Thanks in advance,
>
>Melvin
Any string variables like strcode need to be enclosed in '' (single quotes). Also, you might want to check if the SQL syntax is correct for the database that you are running this against. What is your database here?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only