Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Newbie Question

Status
Not open for further replies.

doctor2001

IS-IT--Management
Oct 21, 2001
71
CA
Hi -
I am banging my head against the wall trying to figure out this query:

arcycle_add_week.Open "UPDATE arcycle SET arcycle.week = " & Text2.Text & " " & "Where arcycle.document = " & Text3.Text & "", acn, adOpenKeyset, adUseClient

What I am hoping it does is:

update a table(arcycle) in column(week) with data from text2 where the critria from text3 is reached.

Can any help !!!

Thanks
 
Are both fields numeric? If they are character, you need to use single quotes around the values.

You don't need to use a recordset, as an update doesn't return any values. Just use the execute method of the connection object.

If you have a way to test your update statement directly in the db (like with query analyzer for SQL Server), try that first with actual data to verify it works.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
That's what i was going to say :)

It looks like a recordset which you really don't need for an update statement.

Transcend
[gorgeous]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top