The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Oracle database connection pools setting skully Oracle Updates (RSS) 0 06-02-2008 03:04 AM
Connection problem with gui java program to postgreaql database using unix uci UNIX for Dummies Questions & Answers 2 12-15-2007 09:16 AM
database connection failing from linux DILEEP410 UNIX for Dummies Questions & Answers 1 10-05-2007 10:07 AM
database connection ramneek High Level Programming 0 10-18-2005 07:14 AM
Database connection whartoner High Level Programming 2 01-15-2002 12:38 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-01-2006
gfhgfnhhn gfhgfnhhn is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 77
Exclamation database connection (unresolved sqlcxt)

i have a little pro*c code (as shown below)
to connect an oracle database. (in unix solaris platform)
in the preprocessor compilation step everything is ok.
but when i try to compile the code using cc i get the
error below:

ld:
Unresolved:
sqlcxt

i think there is a problem while linking but
i cannot find out whats wrong and what should i do
for fixing.


additional information
(i dont have gcc compiler and i dont have demo folder under the
precomp folder)

(i dont have much knowledge about linking and compiling procedure)
i do the things as follow:
proc dat3.pc
cc dat3.c

here is the code :

EXEC SQL BEGIN DECLARE SECTION;
VARCHAR uid[30];
VARCHAR pwd[30];
EXEC SQL END DECLARE SECTION;

EXEC SQL INCLUDE SQLCA.H;

void main()
{

strcpy(uid.arr,"USER");
uid.len =strlen(uid.arr);
strcpy(pwd.arr,"PASSWD");
pwd.len = strlen(pwd.arr);

EXEC SQL WHENEVER SQLERROR GOTO errexit;
EXEC SQL CONNECT :uid IDENTIFIED BY wd;

printf("Connected to Oracle\n");

EXEC SQL COMMIT WORK RELEASE;
return;

errexit:
printf("Connection failed");
return;


} /* end of main */
  #2 (permalink)  
Old 03-01-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
include the directories which contains the libraries for sqlext
mostly to be available under precomp

Code:
cc <sourcefile> -L <dir_include> -o <outputfile>
  #3 (permalink)  
Old 03-01-2006
gfhgfnhhn gfhgfnhhn is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 77
sqlcxt error

thank you matrixmadhan,

but when i include the directory as follows

cc dat3.c -L /u01/app/oracle/product/10102/precomp -o outdat3

i got the following error:

Object file format error in: /u01/app/oracle/product/10102/precomp: read_cur_obj_info: File is not a regular file
  #4 (permalink)  
Old 09-20-2008
sravanadeepthi sravanadeepthi is offline
Registered User
  
 

Join Date: Sep 2008
Location: HYDERABAD
Posts: 2
hey,
Firstly,i don think thr is a linking problem...I had a similar problem not wid connect but i could solve it by using hese tips which u can try to solve...
1.Whenever u hav declared a char array..do initialize them by using memset like
memset(uid,'\0',sizeof(uid));
2.instead using strcpy use memcpy or sprintf.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0