Link to home
Start Free TrialLog in
Avatar of Mateen
Mateen

asked on

Data conversion resulted in overflow.

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?
Avatar of sajuks
sajuks

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;

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 )
Avatar of Mateen

ASKER

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.





"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
Avatar of Mateen

ASKER

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.
Avatar of Mateen

ASKER

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"


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.


Avatar of Mateen

ASKER

The full error message may help u.

<< Error in row 0
     Database vendor error code -2
     Select error: Data-conversion resulted in overflow >>
ASKER CERTIFIED SOLUTION
Avatar of sajuks
sajuks

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mateen

ASKER

<< 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.
Avatar of Mateen

ASKER

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.