[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Data conversion resulted in overflow.

Posted on 2005-05-08
12
Medium Priority
?
3,228 Views
Last Modified: 2013-12-26
I created a datawindow with ODBC.

ODBC seems to give zero errors and native driver does not, so I write this connection script.

SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "looms_monitor_data"
SQLCA.ServerName = "loomdata"
SQLCA.DBParm = "ConnectString='DSN=loom_monitor'"
SQLCA.LogId = 'sa'
SQLCA.LogPass= f_decrypt('ëËßãéÓ')
SQLCA.AutoCommit = False
connect;

I am having error [Data-conversion resulted in overflow].

I changed the connection script to:

ls_latest_dsn = ProfileString (i_ini_file_name, em_company_code.text, "dsn","none")
string ls_database, ls_srv_name
ls_database='Looms_monitor_Data'
ls_srv_name= 'loomdata'
ls_latest_dsn = 'loom_monitor'
sqlca.dbms  = "ODBC"
sqlca.dbparm = "Connectstring='DSN="
sqlca.dbparm = sqlca.dbparm + ls_latest_dsn+";UID=sa;PWD='palosi',disablebind=1"
connect;

Now it is ok and there is no data conversion error.

I want to remain in "MSS Microsoft SQL Server 6.x"
Can Anybody sort it out?
0
Comment
Question by:Mateen
  • 6
  • 5
12 Comments
 
LVL 33

Expert Comment

by:sajuks
ID: 13957266
try getting the value of the Logpass first in a string and then set that varaible value in ur Logpass

strLPass = f_decrypt('ëËßãéÓ')


SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "looms_monitor_data"
SQLCA.ServerName = "loomdata"
SQLCA.DBParm = "ConnectString='DSN=loom_monitor'"
SQLCA.LogId = 'sa'
SQLCA.LogPass= strLPassSQLCA.AutoCommit = False
connect;
0
 
LVL 33

Expert Comment

by:sajuks
ID: 13957294

SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "looms_monitor_data"
SQLCA.ServerName = "loomdata"
SQLCA.LogPass = "thepasswd"
SQLCA.LogId = "theid"
SQLCA.AutoCommit = False
//SQLCA.DBParm = "Secure=1" //if u r uisng windows authentication
connect;

if u r able to connect thru database profile, u could just copy and paste that...r u getting an erro when u r building a specific
dw or is ti for all cases ? try puting a trace to check where the error is
(DBMS=TRACE MSS Microsoft SQL Server 6.x )
0
 

Author Comment

by:Mateen
ID: 13957357
Hi sajuks:

f_decrypt('ëËßãéÓ')
f_decrypt is a powerbuilder function which encrypts decrypted characters and it returns correct value.


There is no problem of connection in any case. The connection is always successful.

The proble is when data is being retrieved

Whem I am connected throug ODBC I get divide by zero error.
I know I can handle this by correcting sql code. Unfortunately the sql there was tricky and very lenghty so I switched to native driver connection. In this connection I don't get divide by zero error. But I do get data conversion resulted in overflow.





0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 33

Expert Comment

by:sajuks
ID: 13957387
"There is no problem of connection in any case. The connection is always successful."
i doubted whether that would just wanted to confirm that since i couldnt undertsand whether ur connection was failing
or dw was failing..
to locate the divide by zero error u need to put a trace as i'd pointed out in my second post, that might
help in isolating the problem
0
 

Author Comment

by:Mateen
ID: 13957389
Please be clear in one thing.

I am getting the data conversion error while trying to open the simplest dtawindow program.
So please do not relate this with divide by zero error.

Please also note that It was all running correctly before. I am facing this problem today.
0
 

Author Comment

by:Mateen
ID: 13957398
Hi sajuks.

Things are getting confused.

Please ignore every thing.

Now
My connection script is

SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "looms_monitor_data"
SQLCA.ServerName = "loomdata"
SQLCA.DBParm = "ConnectString='DSN=loom_monitor'"
SQLCA.LogId = 'sa'
SQLCA.LogPass= f_decrypt('ëËßãéÓ')
SQLCA.AutoCommit = False
connect;

The connection is successful.

I am opening a form which have a simples dw say dw_1 behind.
The sql dw_1 is say "select code,name from table_x"
I get error "Data-conversion resulted in overflow"


0
 
LVL 33

Expert Comment

by:sajuks
ID: 13957409
try regenrating the dw
What PB version ?
Are u using a Text type field in the table  ?
Do all dw objects 've the same problem or is it for a specific dw u r facing this problem ?
Is it for a sp based dw? might be u chnaged something in the sp whcih is not getting reflected in ur dw..
try recreating it.


0
 

Author Comment

by:Mateen
ID: 13957410
The full error message may help u.

<< Error in row 0
     Database vendor error code -2
     Select error: Data-conversion resulted in overflow >>
0
 
LVL 33

Accepted Solution

by:
sajuks earned 1600 total points
ID: 13957438
If regenration fails can u try recreating the dw and see if that .
try removing single columns one after one so that we can isolate which field is causing that problem
So assuming ur select is  "select code,name from table_x"
first select code from table_x if that works then name might be the problem
or vice versa....
didu do any changes to the database/procedure recently like changed the field size or something ??
0
 
LVL 18

Assisted Solution

by:diasroshan
diasroshan earned 400 total points
ID: 13957479
hi,

try switching to ODBC(for same DB) and see if the error persists... just to check...

if the same error occurs with ODBC also then probably there are some changes that have been made in the DB...

if the error is only with native drivers and even regeneration is not helping then try creating a new DW with the same SQL
"select code,name from table_x" and tell us what happened....

Cheers,
Rosh

0
 

Author Comment

by:Mateen
ID: 13957483
<< try removing single columns one after one so that we can isolate which field is causing that problem>>
This technique lead to the cause.

I had a dropdown datawindow associated and its description field length had been increased
in the table. I opened this dd and re-shuffile the columns (regenerated). The problem was gone.

Thanks 4 your help.
0
 

Author Comment

by:Mateen
ID: 13957490
Hi dia:

While I was writing my previous comment u put.

<<if the same error occurs with ODBC also then probably there are some changes that have been made in the DB...>>

U see, u were absolutely right.

Thanks.

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
Suggested Courses
Course of the Month18 days, 20 hours left to enroll

834 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