Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

New Contributor
Posts: 8
Registered: ‎02-12-2013
My Device: all
My Carrier: ..

how can i connect to database

Hello i am new in developping for blackberry 10,

Can someone please help me , how can i connect to my database that i create on the local server wamp thank ypi so much, can someone send me a link or anything that could help me to connect to database so i can store results to database,

Thank you

Posts: 26
Registered: ‎09-23-2012
My Device: Playbook, Z10LE
My Carrier: tnl

Re: how can i connect to database

[ Edited ]

For SQLite:

char * Filename = "app/native/assets/Test.s3db";

char *zErrMsg;
sqlite3 * database;

if(sqlite3_open(Filename, &database) == SQLITE_OK){


   if(sqlite3_exec(database, "select * from table", callback, NULL, &zErrMsg) == SQLITE_OK){

      fprintf(stderr,"The request is successful!\n");