Hero
Hero how about PSQL Sever can we connect.
Please write for me
Thank Hero
NONG
This tutorial is part of Database Programming Made Easy Series.
In this tutorial you'll learn how to retrieve and save data back to the database using Datasets and Data Adapters.
Microsoft Access database and Microsoft SQL Server sample is provided.
Previous: Using Data Readers and ExecuteNonQuery
If txtCName.text isNot "" Then Dim sqlQRY As String = "SELECT * FROM Customers WHERE CNAME = '" & txtCName.text & "'" Else If txtPhone.text isNot "" Then Dim sqlQRY As String = "SELECT * FROM Customers WHERE PNUMBER = '" & txtCName.text & "'" Else If txtAccount.text isNot "" Then Dim sqlQRY As String = "SELECT * FROM Customers WHERE ACCOUNT = '" & txtAccount.text & "'" End If '--then the rest of your code 'Create connection Dim conn As OleDbConnection = New OleDbConnection(cnString) Try ' Open connection conn.Open() 'create data adapter Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlQRY, conn)........ But I get this error "Error 1 'sqlQRY' is not declared. It may be inaccessible due to its protection level. E:\Visual Basic Projects\WorkSummary\WorkSummary\FTMP.vb 44 63 WorkSummary" I appreciate all the help you can give me, thank you so much.