Hi,

I have 2 tables in SQL Server:

Transactions Table
TransNo(PK)
CustNo
TransDate
TotalAmt


TransDetails Table
TransNo(PK)
VideoNo(PK)
VideoTitle
DueDate


One customer has one transNo but more than one VideoNo(if he/she rental more videos.)

I wanted to display the transDetails for a customer in a grid and heres my coding:

Private Sub Grid_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

SqlConnection1.Open()
cm.Connection = SqlConnection1
SQLstr = "Select VideoNo, VideoTitle, DueDate from TransDetails JOIN Transactions ON Transactions.TransNo = TransDetails.TransNo WHERE CustNo ='" & txtCustomerNo.Text & "'"
cm.CommandText = SQLstr

SqlDataAdapter1.SelectCommand = cm

SqlDataAdapter1.Fill(DataSet11)

End Sub

I do have this error when i run it.

An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll

Additional information: System error.

what wong with the coding??
Please help.
viv