Solved

3146 ODBC Call Failed

Posted on 2000-03-05
7
547 Views
Last Modified: 2012-06-22
Now i'm using existing program(VB), when i tried to save the data (SQL server), the error 3146 ODBC call failed occurred.

This error is too general, so tried to run the source code to trace the exact error. It said some of the fields of the table cannot contain null value.
But nobody change the data structure, why this error occurred?

Actually this application been used for yrs oledy, but suddenly hit this error.
Don't know what's wrong?
When i try to ammend the program and insert a default value to that non-null field, the data was inserted succesfuly...why?

Thanks

Phoebe
0
Comment
Question by:siiking
7 Comments
 
LVL 1

Expert Comment

by:vujos
ID: 2585001
0
 
LVL 2

Accepted Solution

by:
alokanant earned 50 total points
ID: 2586481
i think the data u r trying to save, includes a null value for a field in the table, which has been set not to accept null values.
There is no problem with the data structure.

hth
alok.
0
 

Expert Comment

by:kd123
ID: 2587900
One thing to remember. SQL Server view a null and a blank as two different things.  A blank is a white space that has a character value.  Best to check your data and run some queries to see if you have any nulls.  If you do, then you can update them to blanks. (verify the table structure in SQL Server to see if nulls are allowed.)
Also if you have a large amount of data and/or a complicated query, then you might need to change your query timeout settings in the registry.  Depending on the app, is where you will find it in the registry. Do a search for Query Timeout. Most apps set it to a default of 60 (seconds).  You might want to up it.
Last but not least, check to see if you have correct connectivity.  This is a very common error messsge for SQL when it simply can not connect to the table in question.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:siiking
ID: 2591778
Edited text of question.
0
 

Expert Comment

by:kd123
ID: 2591946
Is the application new to the data or vise versa?  You may have contraints in you app that are not necessarily in your physical data structure.  The app would then force the rule.  Typically, they should match, but you have indicated that this is a new error.  The best trace for new errors is always, 'what has changed recently?'.  Have you checked the structure of your SQL table?  If you recently converted from another database system the configurations could have been set to default 'nulls not allowed' for columns unless directly specified.  Again, what is new since you started receiving the error?
0
 

Author Comment

by:siiking
ID: 2592040
Edited text of question.
0
 

Author Comment

by:siiking
ID: 2622447
u r rite..

Thanks
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question