Solved

3146 ODBC Call Failed

Posted on 2000-03-05
7
551 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
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 set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

626 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