sql issue

gjoisa

Active Member
Licensed User
Longtime User
I have a sql database named "Atlas.sl3" , created with B4PPC . In that db I have 9 columns called Field1 Text , Field2 Text ,...... Here in B4Android method used is Col1 Text , Col2 Text . Can the same database can be used here ? While trying I failed to use . .sl3 file can be valid extension or .db should be used ?
And Field1 , field2 can be used ?
 

WZSun

Member
Licensed User
Longtime User
Hi,
I used the same sql database file in B4PPC and B4A. Use the same column field names and table names. Make sure you define them as before, Field1 Text, etc.
There is no restriction on the filename or extension. It can be .db, .usr, .sl3 or whatever.

Rgds
 
Upvote 0

gjoisa

Active Member
Licensed User
Longtime User
Here I am attaching my project . i could not find why this is not working ?
 

Attachments

  • TestMySql.zip
    5.8 KB · Views: 349
Upvote 0

tremara1

Active Member
Licensed User
Longtime User
no db file

It looks as though the db is not in DirAssets which should be the "files" folder where your app is. Also a typo in the if statement where you are checking if the db exists, "Atls.sl3" should be "Atlas.sl3". Also you might want to add a listView to see your data. Hope this helps.....ps you should use the file manager via the files tab in your B4a UI to add the db.
 
Last edited:
Upvote 0

gjoisa

Active Member
Licensed User
Longtime User
After adding the Atlas.sl3 file through file manager also , I am getting an error "java.io.FileNotFoundException" .
 
Upvote 0

gjoisa

Active Member
Licensed User
Longtime User
Made some changes . Now it works in my device . Still not working in emulator .
I think it is because there is no sd card in emulator ???:BangHead:
 
Upvote 0

tremara1

Active Member
Licensed User
Longtime User
Upvote 0
Top