Here is an example from the help on the keword OleDbConnection, in VB.Net,
they don't give the path to the database just the word localhost. How can it
connect to the database without knowing where it is. What does the keyword
localhost do.
Thank's
Fia
Public Sub InsertRow(myConnectionString As String)
' If the connection string is null, use a default.
If myConnectionString = "" Then
myConnectionString = "Provider=SQLOLEDB;Data
Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;"
End If
Dim myConnection As New OleDbConnection(myConnectionString)
Dim myInsertQuery As String = "INSERT INTO Customers (CustomerID,
CompanyName) Values('NWIND', 'Northwind Traders')"
Dim myCommand As New OleDbCommand(myInsertQuery)
myCommand.Connection = myConnection
myConnection.Open()
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
End Sub