Re: SQL SELECT statement, problems with recordset



Hi,

Compiles but doesn't run. Gives an error, "Too few parameters, expected 6",
message.

Thanks for trying,

Gerry Murphy

"Frank Hickman [MVP]" <fhickman3_NOSP@xxxxxxxxxxxxxxx> wrote in message
news:O0cLOVp5FHA.1140@xxxxxxxxxxxxxxxxxxxxxxx
> "Gerry Murphy" <gerrymurphy429@xxxxxxxxx> wrote in message
> news:uyEDge%233FHA.1148@xxxxxxxxxxxxxxxxxxxxxxx
>> Environment: Visual C++ 6.0 and MFC, Windows2000/XP, MSAccess2000
>>
>> Here's where I'm stuck.
>>
>> I'm cataloging my book collection in an MSAccess
>> database and I want to write a UI to search/add/delete
>> records.
>>
>> I've set up three tables, Books, Authors and Publishers.
>> The Books table has numeric fields with indices into the
>> other two tables.
>>
>> I followed the MSDN article entitled "Recordset:Performing a Join (ODBC)"
>> but so far have had no success.
>>
>> I know that the following SQL statement works, because I've tested it
>> against
>> my database using George Poulose's Interactive SQL Tool (using ODBC) from
>> The Code
>> Project and I get the results I expect.
>>
>> SELECT Title, [Last Name] FROM Books LEFT JOIN Authors ON
>> Books.AuthorID1=Authors.[Author ID]
>>
>> But I can't get it to work with a Recordset when I try to follow the MSDN
>> article.
>>
>> Has anyone done this who could point me in the right direction?
>>
>> TIA,
>>
>> Gerry Murphy
>>
>
> The document referenced is somewhat misleading however does contain the
> jist of what is needed to implement a join using ODBC...see if the
> following project will get you pointed in the right direction...
>
> http://www.noblesoft.net/samples/ODBCTest.zip
>
> It requires a DSN named ODBCTest that points to the included database
> file.
>
> --
> ============
> Frank Hickman
> Microsoft MVP
> NobleSoft, Inc.
> ============
> Replace the _nosp@m_ with @ to reply.
>
>


.



Relevant Pages

  • Re: SQL SELECT statement, problems with recordset
    ... > database and I want to write a UI to search/add/delete ... > I've set up three tables, Books, Authors and Publishers. ... > my database using George Poulose's Interactive SQL Tool from ...
    (microsoft.public.vc.database)
  • SQL SELECT statement, problems with recordset
    ... I've set up three tables, Books, Authors and Publishers. ... I followed the MSDN article entitled "Recordset:Performing a Join (ODBC)" ... my database using George Poulose's Interactive SQL Tool from ...
    (microsoft.public.vc.database)