1.Public sr As StreamReader = New StreamReader("ServerName.txt")
Public txt As String = RTrim(sr.ReadLine())
Public my_connec As New OleDb.OleDbConnection("Provider=SQLOLEDB;User ID=sa;Password=;database=gas_meter;
server='"&txt&"'")
2.Public sr As StreamReader = New StreamReader("ServerName.txt")
Public txt As String = RTrim(sr.ReadLine())
Public constr As String = "User ID=sa;Password=;database=gas_meter;server='" & txt & "'"
The first group can't link databases , the second group is right .
why????
Public txt As String = RTrim(sr.ReadLine())
Public my_connec As New OleDb.OleDbConnection("Provider=SQLOLEDB;User ID=sa;Password=;database=gas_meter;
server='"&txt&"'")
2.Public sr As StreamReader = New StreamReader("ServerName.txt")
Public txt As String = RTrim(sr.ReadLine())
Public constr As String = "User ID=sa;Password=;database=gas_meter;server='" & txt & "'"
The first group can't link databases , the second group is right .
why????