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
I'm sure he is... Everyone here has been good to me.. helping me along even on weekends. When I get up to speed I'll do my best to help others. In the mean time... lol.



Robert
Ben Hayat
Ben Hayat
Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Robert Carl Johnson (07/06/2007)
You can count on it Greg, assuming I know the answer.. lol. BigGrin



Robert




Greg, is a good man!

..ßen
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
You can count on it Greg, assuming I know the answer.. lol. BigGrin



Robert
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
No problem...I've had a few of those kind of days myself. It's good to have the forum here to help us during those trying times! Hope you'll do the same for me some day! BigGrin
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
I gotta tell you, the day started out with dumping coffee on my keyboard and it's been downhill since then.. um thanks Greg for spotting what I would have taken me all day to see.. Blush



Regards,



Robert
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Table name is misspelled in second fill method (FillByLength)



{"Invalid object name 'tlbBarelLength'."}


indicates you misspelled the table name.





Public Sub FillByLength(ByVal BarrelLength As String)

....

'-- Build the query

loCommand.CommandText = "SELECT * FROM tlbBarelLength WHERE Length = @length" <-- should be tbl not tlb

.....

End Sub


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