Table Not found - SQLITE error

SmashAndGrab
SmashAndGrab used Ask the Experts™
on
I'm creating a windows phone 8 application.

I'm having some difficulty with my sqlite prepare statement. I get an error saying my table does not exist, although I've checked in multiple places for it, and it does exist, so I'm confused!

Error:
Error
Code:
Code
Database:
Db
Hoping that someone can point me in the right direction :)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Try Database Path.

I think you path is incorrect. If our path is incorrect , SQLite internally creates an empty DB for you. <<So this new DB will not have any tables>>

Check below path....

EE

Author

Commented:
Thanks.

I have simplified the path now..

path
I still get the error!

Frustrating to say the least!
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Ok, Lets hardcode the path and then try ?
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Author

Commented:
hardcode?

Do you mean ..


C:\Users\FFTILSBL\Documents\Visual Studio 2015\Projects\MCRS_Mobile\WP7.VideoScanZXing.SampleApp\bizData.db


dbConn = new SQLitePCL.SQLiteConnection(Windows.ApplicationModel.Package.Current.InstalledLocation.Path + @"\C:\Users\FFTILSBL\Documents\Visual Studio 2015\Projects\MCRS_Mobile\WP7.VideoScanZXing.SampleApp\bizData.db", SQLiteOpen.READWRITE);

Author

Commented:
sqlNewError.PNG
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Not working correct ?

Use below-

@"C:\Users\FFTILSBL\Documents\Visual Studio 2015\Projects\MCRS_Mobile\WP7.VideoScanZXing.SampleApp\bizData.db"

Author

Commented:
I changed it to:

dbConn = new SQLitePCL.SQLiteConnection(Windows.ApplicationModel.Package.Current.InstalledLocation.Path + @"C:\Users\FFTILSBL\Documents\Visual Studio 2015\Projects\MCRS_Mobile\WP7.VideoScanZXing.SampleApp\bizData.db", SQLiteOpen.READWRITE);
           

I get the same error
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Use...

dbConn = new SQLitePCL.SQLiteConnection(@"C:\Users\FFTILSBL\Documents\Visual Studio\2015\Projects\MCRS_Mobile\WP7.VideoScanZXing.SampleApp\bizData.db", SQLiteOpen.READWRITE);

Author

Commented:
i get the same error.

Take a look if you want..

Hello,

Please join the meeting, by clicking on this link:
http://go.teamviewer.com/v11/m52881968

Meeting ID: m52-881-968


Regards,
Buckwell Stuart


www.teamviewer.com - Easy online meeting & screen sharing

Author

Commented:
I thought I'd setup a team viewer meeting?

If not, thats ok.

I tried the path you sent and it still didnt work.

Any ideas?

Author

Commented:
Any further ideas friend?
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
So I am assuming that the path is fine. Also could you please do one thing. Get the final string of the path , put that in the start and press enter and check if we are getting to the database folder.

I am looking for some other options.!

Author

Commented:
Sorry - I don't understand what you mean by:

" Get the final string of the path , put that in the start and press enter and check if we are getting to the database folder"
Database Expert
Awarded 2016
Top Expert 2016
Commented:
I wanted to store the value of Windows.ApplicationModel.Package.Current.InstalledLocation.Path + @"\C:\Users\FFTILSBL\Documents\Visual Studio 2015\Projects\MCRS_Mobile\WP7.VideoScanZXing.SampleApp\bizData.db

in a string variable.

and take that value and click on start and paste that value and press enter. then you should be in the DB folder.

Author

Commented:
ok - If I paste this..

C:\Users\FFTILSBL\Documents\Visual Studio 2015\Projects\MCRS_Mobile\WP7.VideoScanZXing.SampleApp

into Windows explorer then it takes me to the folder where the database is.

Do you want to look on Team vweier?

http://go.teamviewer.com/v11/m52881968

Meeting ID: m52-881-968

Author

Commented:
hello?
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Sorry I was traveling, I am looking..

Author

Commented:
thank you :)

Author

Commented:
would you like to use Team v?

Author

Commented:
its on now if you want to look?

Author

Commented:
Hi,

I found this on Google.

http://forums.macrumors.com/threads/help-with-no-such-table-error-with-sqlite.1141918/

I see that it mentions the path - the only trouble this is written in Xcode and not C#.  

But it may point to the correct issue?

Author

Commented:
hey - any luck?
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Can you try accessing some other table using another query?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial