The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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.3k9129262
accept rate: 40%

edited 04 Jul '16, 06:05

Volker%20Barth's gravatar image

Volker Barth
29.3k287438644

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:

×404
×23

question asked: 16 Jan '12, 19:10

question was seen: 770 times

last updated: 04 Jul '16, 06:05