Folks,

Just wondering if it is possible to spawn a new database engine instance from within the c-api?

I want to be able to do something like this from within my application

dbspawn dbeng12 -n Test1 /Users/DCleyne/Test1.db

Cheers,

Dan

asked 16 Jan '12, 19:10

Dan%20Cleyne's gravatar image

Dan Cleyne
486101627
accept rate: 25%

edited 16 Jan '12, 19:58


You can use the DBF connection parameter to specify the pathname to the database file and the client library will start an engine automatically if needed.

Example:

res = api.sqlany_connect( conn, "uid=dba;pwd=sql;dbf=/Users/DCleyne/Test1.db" );

Also take a look at the START connection parameter.

This topic on locating a server in the docs also talk about auto-starting a database.

permanent link

answered 16 Jan '12, 21:58

Mark%20Culp's gravatar image

Mark Culp
22.9k9129269
accept rate: 41%

edited 04 Jul '16, 06:05

Volker%20Barth's gravatar image

Volker Barth
30.3k300452659

That's excellent!

Thanks Mark

(17 Jan '12, 00:06) Dan Cleyne
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×409
×24

question asked: 16 Jan '12, 19:10

question was seen: 826 times

last updated: 04 Jul '16, 06:05