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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 3146 ODBC call failed

Status
Not open for further replies.

besto1a

Programmer
Aug 20, 2006
41
GB
All I have this code trying to execute a stored procedure on a sql server:

myQD.Connect = "ODBC;Description=PLYSQL03;DRIVER=SQL Server;SERVER=PLYSQL09;UID=Blahblah;PWD=BlahBlah;"

myQD.SQL = "EXECUTE addUserName '" & UID & "','" & Name & "'"

myQD.Execute

However when i run this I get error 3146 Odbc call failed

Can you help?

 
Hi besto1a:

Is one of the fields a required field that is possibly receiving a null value?

I was having this same problem all day to day. I found out that the error code should have been 3162 but it was returning a 3146.

I trapped for a zero length value. Then I moved my procedure to the Form_Before_Update Event and set cancel = true. The user could not continue and the error stopped happening.

I hope this Helps
hturk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top