Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ODBC update problem

ODBC update problem

ODBC update problem

Hello all.

I'm in the process of adding simple ODBC functionnality to our in-house software. So far I can retrieve text & int data and then update the database. I'm using win2000, Visual Studio 6 (w/ C), SQL Server 2000 and the Northwind demo database. I had previously no experience with SQL nor ODBC.

This Query is my problem right now. It aims to change the city of an employee, based on his primary key that was retrieved earlier. I had no problem with update queries using string comparison (ie : where "firstname" like 'andrew' is ok), but this here, using an int as a comparison, just hangs on execution.

The same query, run in Query Analyzer, works just fine, so the problem is just when I make the ODBC call in C.

I tried tracing the driver call from Query Analyzer and my program call, but they are the same (programmed one just seems to run forever).

Query (northwind) :

pszQuery <=> update "Employees" set "City" = 'Citytest' where "EmployeeID" = 1

Does anyone here have an idea about this ? I may be doing something stupid, but I have no clue what...

Many thanks in advance.

Sebastien Ruchet / sruchet@NOSPAMwizart.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close