I am trying to connect to a Firebird database using firebirdsql in Go (v1.14).
db_path := "D:\\DBs\\test.fdb"
conn, err := sql.Open("firebirdsql", ("sysdba:master@127.0.0.1:3050/" + db_path) )
err = conn.Ping()
if err != nil {
fmt.Println("db.Ping failed:", err)
}
The code above works just fine but as soon as I introduce hash symbol (#) in the path (ex: db_path := "D:\\#DBs\\test.fdb"
), I could not connect and firebirdsql complains that path is not valid (it reads the path up to the hash sign):
db.Ping failed: I/O error during "CreateFile (open)" operation for file "D:\"
Error while trying to open file
The system cannot find the path specified.
Is it a bug in firebirdsql or I am doing something wrong here?