Icon View Incident Report

Minor Minor
Reported By: Fabian Kneubuehl
Reported On: 11/24/2014
For: Version 2.18 Build 1
# 4128 Leading Spaces in ODBC/.NET Data Provider Connection Strings Cause Attribute to be Ignored

I tried a first simple thing, creating an empty database in VB.NET. On opening the connection I always get Error 409.

    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 Function



Comments Comments and Workarounds
ElevateDB now left-trims any leading spaces from connection string attribute names.


Resolution Resolution
Fixed Problem on 11/25/2014 in version 2.18 build 2


Products Affected Products Affected
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial

Image