Re: Problems with PROC: Connect statement modifying local variable
Date: Thu, 9 Nov 2000 09:51:55 +0100
Message-ID: <3a0a65c3_at_news.ic-marl.de>
Dirk Jablonski <dj_at_insos.com> schrieb in im Newsbeitrag:
3A07BFE3.421FA4B_at_insos.com...
> [...]
> 1) I fill a 'struct tm' named myTime variable with my own values
> 2) I call EXEC SQL CONNECT :username IDENTIFIED BY :password;
>
> After the connect statement, the contents of myTime have changed. Can
> anybody tell me why?
> This struct has NOTHING to do with the database...
This looks more like a typicall C-Problem than an Oracle-Problem. Whenever
you write something into a variable, which has been defined to small to take
the value, you will write into the space next behind this variable. And
there will usually be another variable. Whenever the content of a variable
changes allthough it had not been touched, it is just a side effect of the
original problem.
In most cases you have a string with missing "\0" or simply too long for the
variable you write into.
regards
Holger Kreft Received on Thu Nov 09 2000 - 09:51:55 CET