Re: sql syntax error....




"chris-university student"
<chrisuniversitystudent@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:88C9D8D2-84DD-422D-8782-4D23F5FB7CF6@xxxxxxxxxxxxxxxx
hey...goodmorning...thanks for your replies!

the error is this: the item could not be found to the collection
corresponding to the requested name or ordinal...'3265'


This error is rather accurate when identifying the error. Take a look at
this:
http://support.microsoft.com/kb/q197528/

It looks like you are taking a few 'shortcuts' and depending on defaults to
retrieve values.
eg:
.Fields("EMP_CODE") = cn.Execute("SELECT EMP_CODE FROM
EMPLOYEES WHERE(EMPLOYEES.NAME_SURNAME LIKE '" &
cmbname.Text & "');")

While not suggesting that there is a specific problem with this construct in
this circumstance, note that the AddNew, Update methods depend on ADO making
correct assumptions (guesses) behind the scenes on what it is you want to
do.

Try expanding your code, particularly retrieving and clearing recordsets and
fully qualifying all members to isolate the problem. You can always go back
to your 'streamlining' once you find the source of the error.

-ralph



.


Loading