![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 PHP Extension Manual » Connection Functions » edb_changedb |
edb_changedb(<ConnectionHandle>, <DatabaseName>) <ConnectionHandle> = Handle of connection returned by edb_connect function <DatabaseName> = Valid database name
TRUE if successful, or FALSE if there are any errors
<?php // The following script connects to an ElevateDB // Server and the system Configuration database, // creates a new database if it doesn't already exist, // changes to the new database using the edb_changedb() // function, and then disconnects using the // edb_disconnect() function $con = edb_connect("type=remote;charset=Ansi;address=127.0.0.1;"+ "uid=Administrator;pwd=EDBDefault;database=Configuration"); if (!$con) { die("Could not connect: " . edb_errmsg()); } echo edb_db($con); if (edb_execsql($con,"SELECT * FROM Databases WHERE Name='Tutorial'") == 0) { edb_execsql($con,"CREATE DATABASE Tutorial PATH 'C:\Tutorial'"); } edb_changedb($con,"Tutorial"); echo edb_db($con); edb_disconnect($con); ?>
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |