Hi
I have problem with mediplayer database it is unable to read the special charecters like singel quote.if insert the video files in sdcard they will be directly staored in defaault mediaplayer database.I am getting the video details from default datbase to my custom database.
if i enters a single quote in input it crashes.example
Cursor cursor = c.getContentResolver().query(Uri.parse(VideoProvider.CONTENT_URI+"/video"),
new String[]{VideoProvider.PAUSE_STATE,VideoProvider.VOLUME},"movieLocation='" + movieLocation+"'", null,null);
I am getting the value like this.
It showing error as
12-17 12:34:54.622: ERROR/AndroidRuntime(3340): Caused by: android.database.sqlite.SQLiteException: near "s": syntax error: , while compiling: SELECT pausePosition, volume FROM video_database WHERE (movieLocation='/mnt/usbdisk/andre's card/DSC_0005.AVI')
Is there any solution to resolve this problem
Thank you
I have problem with mediplayer database it is unable to read the special charecters like singel quote.if insert the video files in sdcard they will be directly staored in defaault mediaplayer database.I am getting the video details from default datbase to my custom database.
if i enters a single quote in input it crashes.example
Cursor cursor = c.getContentResolver().query(Uri.parse(VideoProvider.CONTENT_URI+"/video"),
new String[]{VideoProvider.PAUSE_STATE,VideoProvider.VOLUME},"movieLocation='" + movieLocation+"'", null,null);
I am getting the value like this.
It showing error as
12-17 12:34:54.622: ERROR/AndroidRuntime(3340): Caused by: android.database.sqlite.SQLiteException: near "s": syntax error: , while compiling: SELECT pausePosition, volume FROM video_database WHERE (movieLocation='/mnt/usbdisk/andre's card/DSC_0005.AVI')
Is there any solution to resolve this problem
Thank you