Thread: Open for help
View Single Post
  #4 (permalink)  
Old June 15th, 2003, 11:21 PM
JonathanC JonathanC is offline
Authorized User
 
Join Date: Jun 2003
Location: Cowes, IOW, United Kingdom.
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JonathanC
Default

Hi JovenaL

This sounds like your SQL Select statement is incorrect.
The error you get likely occurs because the name of a table or field
is incorrect.
I have pasted the code from my version of the code. Look for the difference between yours and the code below.


'Start ................

  objDataAdapter.SelectCommand.CommandText = _
            "SELECT au_lname, au_fname, title, price " & _
            "FROM authors " & _
            "JOIN titleauthor ON authors.au_id = titleauthor.au_id " & _
            "JOIN titles ON titleauthor.title_id = titles.title_id " & _
            "ORDER BY au_lname, au_fname"
        objDataAdapter.SelectCommand.CommandType = CommandType.Text


'end ..............

I think its very likely that it is an error caused by a typo.

Please Let me know if this is the case.




Quote:
quote:Originally posted by JovenaL
 Whoops, I copied the wrong line of code that was giving me the error.

Here is the line that gets highlighted:

        'Now execute the command...
        myDataAdapter.SelectCommand.ExecuteNonQuery()

Sorry for the confusion.
Jonathan Crossland
http://www.jonathancrossland.com