?
Solved

Table Not found  - SQLITE error

Posted on 2016-11-22
23
Medium Priority
?
108 Views
Last Modified: 2017-01-12
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 :)
0
Comment
Question by:SmashAndGrab
  • 15
  • 8
23 Comments
 
LVL 37

Expert Comment

by:Pawan Kumar
ID: 41898371
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
0
 

Author Comment

by:SmashAndGrab
ID: 41898759
Thanks.

I have simplified the path now..

path
I still get the error!

Frustrating to say the least!
0
 
LVL 37

Expert Comment

by:Pawan Kumar
ID: 41898763
Ok, Lets hardcode the path and then try ?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:SmashAndGrab
ID: 41898768
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);
0
 

Author Comment

by:SmashAndGrab
ID: 41898772
sqlNewError.PNG
0
 
LVL 37

Expert Comment

by:Pawan Kumar
ID: 41898775
Not working correct ?

Use below-

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

Author Comment

by:SmashAndGrab
ID: 41898783
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
0
 
LVL 37

Expert Comment

by:Pawan Kumar
ID: 41898786
Use...

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

Author Comment

by:SmashAndGrab
ID: 41898794
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
0
 

Author Comment

by:SmashAndGrab
ID: 41898803
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?
0
 

Author Comment

by:SmashAndGrab
ID: 41898954
Any further ideas friend?
0
 
LVL 37

Expert Comment

by:Pawan Kumar
ID: 41898991
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.!
0
 

Author Comment

by:SmashAndGrab
ID: 41898993
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"
0
 
LVL 37

Accepted Solution

by:
Pawan Kumar earned 2000 total points
ID: 41899000
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.
0
 

Author Comment

by:SmashAndGrab
ID: 41899006
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
0
 

Author Comment

by:SmashAndGrab
ID: 41899264
hello?
0
 
LVL 37

Expert Comment

by:Pawan Kumar
ID: 41899266
Sorry I was traveling, I am looking..
0
 

Author Comment

by:SmashAndGrab
ID: 41899268
thank you :)
0
 

Author Comment

by:SmashAndGrab
ID: 41899269
would you like to use Team v?
0
 

Author Comment

by:SmashAndGrab
ID: 41899270
its on now if you want to look?
0
 

Author Comment

by:SmashAndGrab
ID: 41899392
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?
0
 

Author Comment

by:SmashAndGrab
ID: 41900237
hey - any luck?
0
 
LVL 37

Expert Comment

by:Pawan Kumar
ID: 41901077
Can you try accessing some other table using another query?
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question