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

ODBC API

Status
Not open for further replies.

z96andh

Programmer
Oct 1, 2001
14
0
0
SE
Hi

Can i set in the ODBC driver that a string should delete all trailing spaces?

Best Regards
//Anders
 
Never seen this done with an ODBC. ODBC means open database connectivity, it is more of a gateway than a language.
You shoul duse SQL or PL/SQL to do what you need.
 
I have a strange problem...

I am trying to do a INSERT INTO statement. When I try to pass a variable containing ' ' (7 spaces) to a NOT NULL column i get the answer: CANNOT INSERT NULL INTO pointing at the NOT NULL column...

I don't know where to start looking. The variable is REALLY containing ' '...

Regards
//Anders
 
I dont get why you want to insert all spaces in a not null column. Spaces are pretty close to null in a varchar column.
If you have to insert spaces into that column, you should rethink some part of the data model, and maybe remove the constraint.
If you have to do this as a oneshot deal, you can disable the contraint, run the update and then re-enable the contraint with the exception clause.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top