Click here to Skip to main content
11,804,574 members (89,953 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VB VB.NET
Hai there guys. Sorry if my subject isn't clear enough because I don't know how else to put. So here's the thing, I need to debug and test a VB.NET windows application for hotel management system. I'm quite new to VB.NET, so there is a few lines of database query that I didn't get. There is a few lines such as :

Com.CommandText = "Select * from QRoom Order by RoomNo"


Com.CommandText = "Select Floor from QRoom where RoomNo=" & cbo.Text & ""

as you can see the table name there is QRoom but when I check within the Access database, there is no table name QRoom. But if I change the table name to the one that us in the database(which is my case, it is TblRoom), then there will be errors. So I didn't get why is that. Any help is appreciated. Smile | :)

p/s : the guy who wrote this code is unreachable st the moment so I cannot directly ask him. :(
Posted 26-Nov-12 22:03pm
André Kraak at 27-Nov-12 4:37am
Did you check to see whether QRoom is a query in the database?
Does the table TblRoom contain the field RoomNo?
nizam15 at 27-Nov-12 4:42am
yes, there is a field name RoomNo within the TblRoom table.
where to check if there is a query in the database?sorry this is my first time using microsoft access.
André Kraak at 27-Nov-12 4:51am
I tried finding something that shows where the queries are. This might help Queries For MS Access 2007[^].
nizam15 at 27-Nov-12 5:32am
I did find the queries. But what I didn't understand is why is it when I change the queries I posted above to an actual table name within the database, it came up with an error :
"No value given for one or more required parameters."

as if that table doesn't exist.
VitorHugoGarcia at 28-Nov-12 5:02am
My best guest is that QRoom is a query with parameters.
Find the query and see which parameter it is waiting for and act accordingly.
VitorHugoGarcia at 28-Nov-12 5:03am
Which version of ms access are you using ?
Ezra Neil at 3-Jan-13 6:07am
I agree with this. It is most probably another query with parameter. Look carefully in the list of tables.
nizam15 at 27-Nov-12 5:01am
thanks for the reference. Well if I follow that correctly, I can't seem to find any query for that particular table.
Mathlab at 27-Nov-12 10:58am
Did you check to see if its in the list of views?
Mathlab at 27-Nov-12 10:59am
Please post the code preceeding the query
nizam15 at 28-Nov-12 9:40am
it's ok guys, I'm satisfied by finding what is the mysteries behind the Q table. Thanks a bunch guys~ :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 3,205
1 Maciej Los 1,950
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,187

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 27 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100