![]() | Products |
| Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Addressed for Version 2.18 » View Incident Report |
| Reported By: Fabian Kneubuehl Reported On: 11/24/2014 For: Version 2.18 Build 1 |
Public Function InitDB(ByVal Folder As String) As DBError
Dim DataCommand As New Elevate.ElevateDB.Data.EDBCommand
Dim DataConnection As New Elevate.ElevateDB.Data.EDBConnection
If Folder = "" Then
InitDB = DBError.FolderNameMissing
Exit Function
End If
If Folder.Substring(Len(Folder) - 1, 1) <> "\" Then Folder += "\"
If File.Exists(Folder + DBFILENAME + "." + DBFILEEXT) Then
InitDB = DBError.DBAlreadyExists
Exit Function
End If
DataConnection.ConnectionString = "Type=Local; Database=" + DBNAME
DataCommand.Connection = DataConnection
DataConnection.Open()
DataCommand.CommandText = "CREATE DATABASE " + DBNAME + " PATH='" + Folder + "' DESCRIPTION='" + DBDESCRIPTION + "' CONFIGPATH='" + Folder + "'"
DataConnection.Close()
InitDB = DBError.NoError
DataCommand = Nothing
DataConnection = Nothing
End FunctionThis web page was last updated on Wednesday, October 22, 2025 at 04:21 PM | Privacy Policy © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

