Error executing Search code


Author
Message
Robert Carl Johnson
Robert Carl Johnson
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 130
Hi all. I have incorporated search in my maintenance forms using the technique from the turorial 6. Upon running I get an error:



{"Invalid object name 'tlbBarelLength'."}



Code under my search button:



Me.BarrelLgtnBO1.FillByLength(Me.txtSearch.Text)



My BO code:





Public Sub FillTop100()

Me.FillDataTable("Select TOP 100 * FROM tblBarelLength")



End Sub





Public Sub FillByLength(ByVal BarrelLength As String)

'-- Estabish Locals

Dim loCommand As New SqlCommand



'-- Build the query

loCommand.CommandText = "SELECT * FROM tlbBarelLength WHERE Length = @length"



'-- Add the parameter

loCommand.Parameters.Add("@length", SqlDbType.VarChar)

loCommand.Parameters("@length").Value = BarrelLength



'-- Execute the command to fill the business object

Me.FillDataTable(loCommand)

End Sub



Now the if the FillTop100 code works which is calling the same table object why is the FillByLength code inop?



Lost In Ventura....Pinch



Regards,



Robert





GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search