Solved

3146 ODBC Call Failed

Posted on 2000-03-05
7
540 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
Comment Utility
0
 
LVL 2

Accepted Solution

by:
alokanant earned 50 total points
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:siiking
Comment Utility
Edited text of question.
0
 

Expert Comment

by:kd123
Comment Utility
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
Comment Utility
Edited text of question.
0
 

Author Comment

by:siiking
Comment Utility
u r rite..

Thanks
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now