473,466 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

the USER

Sorry if I disturb this ng but i need to someone because I'm cry !

For my problem, and now I think for my .... i don't know I try tu put in C
program this peace of code, after the connect !

EXEC SQL BEGIN DECLARE SECTION;
char UserOfDb2 [255];
EXEC SQL END DECLARE SECTION;
......
......
exec sql select user into :UserOfDb2 from sysibm.sysdummy1 ;
fprintf(pfFileLog,"\n-%d- CONNNESIONE CON
L'UTENTE[%s]\n",__LINE__,UserOfDb2 );

But the program goes, every time in coredump ??!??!!

someone can help me ?

which is the type of data of user in db2 ? For example in oracle is a
varchar2(30) !!

regards
sergio


Nov 12 '05 #1
6 1473
Huh ???

"eap90210" <ea******@yahoo.it> wrote in message
news:d6***********@stargate1.inet.it...
Sorry if I disturb this ng but i need to someone because I'm cry !

For my problem, and now I think for my .... i don't know I try tu put in C
program this peace of code, after the connect !

EXEC SQL BEGIN DECLARE SECTION;
char UserOfDb2 [255];
EXEC SQL END DECLARE SECTION;
......
......
exec sql select user into :UserOfDb2 from sysibm.sysdummy1 ;
fprintf(pfFileLog,"\n-%d- CONNNESIONE CON
L'UTENTE[%s]\n",__LINE__,UserOfDb2 );

But the program goes, every time in coredump ??!??!!

someone can help me ?

which is the type of data of user in db2 ? For example in oracle is a
varchar2(30) !!

regards
sergio

Nov 12 '05 #2
eap90210 wrote:
Sorry if I disturb this ng but i need to someone because I'm cry !

For my problem, and now I think for my .... i don't know I try tu put in C
program this peace of code, after the connect !

EXEC SQL BEGIN DECLARE SECTION;
char UserOfDb2 [255];
EXEC SQL END DECLARE SECTION;
......
......
exec sql select user into :UserOfDb2 from sysibm.sysdummy1 ;
fprintf(pfFileLog,"\n-%d- CONNNESIONE CON
L'UTENTE[%s]\n",__LINE__,UserOfDb2 );

But the program goes, every time in coredump ??!??!!

someone can help me ?

which is the type of data of user in db2 ? For example in oracle is a
varchar2(30) !!

regards
sergio


Instead of asking humans on newsgroup - you should ask DB2 - it knows better:

D:\Working>db2 describe select user from sysibm.sysdummy1

SQLDA Information

sqldaid : SQLDA sqldabc: 896 sqln: 20 sqld: 1

Column Information

sqltype sqllen sqlname.data sqlname.length
-------------------- ------ ------------------------------ --------------
448 VARCHAR 128 1 1
Jan M. Nelken
Nov 12 '05 #3
BEST THANKS for the patiance

I'm sorry for my ignorance but I see that user is define to 128! and I think
that to declare a variabile at 255 it was sufficiente but it no true, and
for this reason I ask to NG.

I don't want to disturb anybody so try to understand.

always thanks for your help

regards
Sergio
"Jan M. Nelken" <Un**********@Invalid.Domain> ha scritto nel messaggio
news:42********@news1.prserv.net...
eap90210 wrote:
Sorry if I disturb this ng but i need to someone because I'm cry !

For my problem, and now I think for my .... i don't know I try tu put in
C program this peace of code, after the connect !

EXEC SQL BEGIN DECLARE SECTION;
char UserOfDb2 [255];
EXEC SQL END DECLARE SECTION;
......
......
exec sql select user into :UserOfDb2 from sysibm.sysdummy1 ;
fprintf(pfFileLog,"\n-%d- CONNNESIONE CON
L'UTENTE[%s]\n",__LINE__,UserOfDb2 );

But the program goes, every time in coredump ??!??!!

someone can help me ?

which is the type of data of user in db2 ? For example in oracle is a
varchar2(30) !!

regards
sergio


Instead of asking humans on newsgroup - you should ask DB2 - it knows
better:

D:\Working>db2 describe select user from sysibm.sysdummy1

SQLDA Information

sqldaid : SQLDA sqldabc: 896 sqln: 20 sqld: 1

Column Information

sqltype sqllen sqlname.data
sqlname.length
-------------------- ------ ------------------------------ --------------
448 VARCHAR 128 1
1
Jan M. Nelken

Nov 12 '05 #4
The data is VARCHAR, your declaration isn't. Review the programming guide
for how to define a VARCHAR in C.

"eap90210" <ea******@yahoo.it> wrote in message
news:d6***********@stargate1.inet.it...
BEST THANKS for the patiance

I'm sorry for my ignorance but I see that user is define to 128! and I
think that to declare a variabile at 255 it was sufficiente but it no
true, and for this reason I ask to NG.

I don't want to disturb anybody so try to understand.

always thanks for your help

regards
Sergio
"Jan M. Nelken" <Un**********@Invalid.Domain> ha scritto nel messaggio
news:42********@news1.prserv.net...
eap90210 wrote:
Sorry if I disturb this ng but i need to someone because I'm cry !

For my problem, and now I think for my .... i don't know I try tu put in
C program this peace of code, after the connect !

EXEC SQL BEGIN DECLARE SECTION;
char UserOfDb2 [255];
EXEC SQL END DECLARE SECTION;
......
......
exec sql select user into :UserOfDb2 from sysibm.sysdummy1 ;
fprintf(pfFileLog,"\n-%d- CONNNESIONE CON
L'UTENTE[%s]\n",__LINE__,UserOfDb2 );

But the program goes, every time in coredump ??!??!!

someone can help me ?

which is the type of data of user in db2 ? For example in oracle is a
varchar2(30) !!

regards
sergio


Instead of asking humans on newsgroup - you should ask DB2 - it knows
better:

D:\Working>db2 describe select user from sysibm.sysdummy1

SQLDA Information

sqldaid : SQLDA sqldabc: 896 sqln: 20 sqld: 1

Column Information

sqltype sqllen sqlname.data sqlname.length
-------------------- ------ ------------------------------ --------------
448 VARCHAR 128 1 1
Jan M. Nelken


Nov 12 '05 #5
Mark Yudkin wrote:
The data is VARCHAR, your declaration isn't. Review the programming guide
for how to define a VARCHAR in C.


The declaration is quite fine.

As to why the program segfaults, the information is not helpful at all. Do
you (OP) know exactly at which line of the code the segfault occurs? Have
you run it through a debugger?

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #6
Knut Stolze wrote:
Mark Yudkin wrote:

The data is VARCHAR, your declaration isn't. Review the programming guide
for how to define a VARCHAR in C.

The declaration is quite fine.

As to why the program segfaults, the information is not helpful at all. Do
you (OP) know exactly at which line of the code the segfault occurs? Have
you run it through a debugger?


Yes, perhaps you could post a backtrace (or at least the part that
matters). I know this is a bit offtopic, but hey, it doesn't hurt
anyone, does it.

-R-
Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

60
by: Fotios | last post by:
Hi guys, I have put together a flexible client-side user agent detector (written in js). I thought that some of you may find it useful. Code is here: http://fotios.cc/software/ua_detect.htm ...
3
by: zlst | last post by:
Many technological innovations rely upon User Interface Design to elevate their technical complexity to a usable product. Technology alone may not win user acceptance and subsequent marketability....
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
1
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a...
7
by: jsale | last post by:
I'm currently using ASP.NET with VS2003 and SQL Server 2003. The ASP.NET app i have made is running on IIS v6 and consists of a number of pages that allow the user to read information from the...
0
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
1
by: Carlettus | last post by:
Dear All, sorry but I'm not sure if this is the right place to post my problem. I was using the following asp code to create users in Active Directory. Suddenly, and I don't know the reason, users...
0
by: rbukkara | last post by:
Hi, I have got the following error while trying to add a user in the LDAP Directory. javax.naming.NameNotFoundException: ; remaining name 'uid=vassila,ou=People,dc=cs,dc=uno,dc=edu' I have...
9
by: Gordon | last post by:
I want to add a feature to a project I'm working on where i have multiple users set up on my Postgres database with varying levels of access. At the bare minimum there will be a login user who...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.