Solved

3146 ODBC Call Failed

Posted on 2000-03-05
7
549 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

680 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