Re: sql syntax error....
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Wed, 23 Apr 2008 09:36:46 -0500
"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
.
- Follow-Ups:
- Re: sql syntax error....
- From: William Vaughn [MVP]
- Re: sql syntax error....
- References:
- sql syntax error....
- From: chris-university student
- Re: sql syntax error....
- From: Jan Hyde (VB MVP)
- Re: sql syntax error....
- From: chris-university student
- sql syntax error....
- Prev by Date: Re: sql syntax error....
- Next by Date: ADO Chunk Operations Truncated at 511,000 Bytes for Updates
- Previous by thread: Re: sql syntax error....
- Next by thread: Re: sql syntax error....
- Index(es):
Loading