Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

open connection with informix

kamal_15
Regular Advisor

open connection with informix

hi all
iam new with hp-ux
i have hp-ux version 10.2 and database informix version 5.05

i want to execute a simple script containing insert statment.

but how can i establish connection with the database and execute this query?


thankx
kamal
6 REPLIES
Slawomir Gora
Honored Contributor

Re: open connection with informix

Hi,

you can use dbaccess command as informix user.
ex:
dbaccess DB_NAME script.sql
(replace DB_NAME)

without arguments dbaccess will run in cursor-graphics mode.

kamal_15
Regular Advisor

Re: open connection with informix

thank u fro your reply

but i need to open a connection with database and execute my query from my script

not from user command prompt

how can i do it?
thankx
Slawomir Gora
Honored Contributor

Re: open connection with informix

Hi,

I'am not sure what you want to do, what type
of script do you want to write ?

If you want simple shell script you can use
dbaccess command in syntax:
dbaccess DB_NAME insert.sql

where insert.sql has entries:
insert into ...




kamal_15
Regular Advisor

Re: open connection with informix

i want to do the following


1-vi file1

2-i want to type in this file sql statment

i want when execute this file the sql statment executed without openinig the database in graphical mode.(without typing dbaccess)

(i want to make a simple script as any application working with database)


thankx
Slawomir Gora
Honored Contributor

Re: open connection with informix

Hi,

just run dbaccess in this syntax:
dbaccess DB_NAME script.sql

there will be no graphical mode - this is syntax for scripting.
kamal_15
Regular Advisor

Re: open connection with informix

many thankx

kamal