문제

by default MS access connection string is

connection = "Driver={Microsoft Access Driver (*.mdb)};" & _
    "dbq=Database1.mdb;" & _
    "DefaultDir=E:\somepath;" & _
    "uid=Admin;Pwd=;"

and i want use label to get database path info

connection = "Driver={Microsoft Access Driver (*.mdb)};" & _
    Chr(34) & "dbq=" & lblF.Caption & ";" & Chr(34) & _
    Chr(34) & "DefaultDir=" & LocL.Caption & ";" & Chr(34) & _
    "uid=Admin;Pwd=;"

but it's fail :(

올바른 솔루션이 없습니다

다른 팁

Remove all the Chr() calls. You don't need to insert any double quotes in this connection string.

i.e.

connection = "Driver={Microsoft Access Driver (*.mdb)};" & _
             "dbq=" & lblF.Caption & ";" & _
             "DefaultDir=" & LocL.Caption & ";" & _
             "uid=Admin;Pwd=;"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top