Questions tagged [prepare]

A prepared statement is used to execute the same SQL statement repeatedly with high efficiency.

A prepared statement is used to execute the same SQL statement repeatedly with high efficiency.

See documentation for more information.

210 questions
17
votes
2 answers

MediaPlayer.setDataSource() and prepare() not working - android

I'm having a crack at using the MediaPlayer object and not having much success. If I add a sound asset to my raw folder and call it using the int value within R, it works fine. But I want to be able to pull things off of url. According to all of…
Kyle
  • 10,839
  • 17
  • 53
  • 63
12
votes
3 answers

Cordova Plugin alternate to tag to copy entire directory contents

Is there any way to specify in plugin.xml to copy every file in plugin source folder to the target platform directory either with one dir copy statement or automatically copy every file in src directory. Using to be copied as part of big plugin is…
Raja Nagendra Kumar
  • 792
  • 1
  • 6
  • 19
12
votes
3 answers

Can Maven release:prepare update snapshot version to the release version in batch mode

mvn release:prepare It constantly asks me to resolve snapshot dependencies. Is there a way to do this in batch mode so that maven automatically uses the associated release. i.e. if a dependency is 1.0.0-SNAPSHOT it will automatically update this…
DarVar
  • 16,882
  • 29
  • 97
  • 146
11
votes
2 answers

Android playing resource files from internal storage causes MediaPlayer.prepare to give IOException

My app plays audio resource files from the internal directory designated for my app (/data/data/com...). It seems to download the files to that location okay, setDataSource(String path) doesn't throw any exceptions, but MediaPlayer.prepare() throws…
AnimatedRNG
  • 1,859
  • 3
  • 26
  • 39
11
votes
3 answers

PHP stmt prepare fails but there are no errors

I am trying to prepare a mysqli query, but it fails silently without giving any error. $db_hostname = "test.com"; $db_database = "dbname"; $db_username = "db_user"; $db_password = "password"; $db = new…
Typel
  • 1,109
  • 1
  • 11
  • 34
11
votes
2 answers

AndroId MediaPlayer prepareAsync method

I have a strange problem. I use the prepareAsync method with the MediaPlayer, but the listener that I declared just never gets fired. I try to stream a live .mp3 feed from the Internet (radio station). I use an inline method for the listener, but I…
Patrice Cote
  • 3,572
  • 12
  • 43
  • 72
9
votes
4 answers

PDO MYSQL Update Only If Different

I have a web program which allows the administrator to update a user's information... With that being said, I only want columns updated which have indeed been 'updated'... I have done quite a bit of researching on this and it seems that all methods…
hawkhorrow
  • 475
  • 2
  • 7
  • 18
9
votes
3 answers

Android MediaPlayer prepare failed: status = 0x1

I'm building an audio recorder that needs to play back the recorded sound. I'm running into a lot of trouble playing back the audio. I know that the file exists because I isolated it into a folder on my SD Card, but for some reason it can't play it…
jkatz94
  • 199
  • 1
  • 2
  • 11
9
votes
4 answers

postgresql.conf max_prepared_transactions doesn't work

I opened up my postgresql.conf file in the postgres data folder and changed the value of max_prepared_connections to a non-zero value. However, every time I try using a "PREPARE TRANSACTION 'foo';"command, I get an error saying that…
Carol-Ann
  • 101
  • 1
  • 1
  • 3
7
votes
4 answers

PHP PDO Prepare queries

I read on PDO and I searched on StackOverFlow about pdo and prepare statement. I want to know what are/is the benefits or using the prepare statement. eg: $sql = 'SELECT name, colour, calories FROM fruit WHERE calories < :calories AND colour =…
joel
  • 1,034
  • 9
  • 17
6
votes
2 answers

Commit some files while maven release:prepare

Is it possible to commit some file (no pom.xml) while mvn release:prepare? In My MultiModul Project I configured the rlease plugin with preparationGoals to change the Version in a sql file. clean verify…
bennixview
  • 91
  • 7
5
votes
2 answers

MySQL PREPARE statement in stored procedures

I have this sql file: USE mydb; DROP PROCEDURE IF EXISTS execSql; DELIMITER // CREATE PROCEDURE execSql ( IN sqlq VARCHAR(5000) ) COMMENT 'Executes the statement' BEGIN PREPARE stmt FROM sqlq; EXECUTE…
Lucio Crusca
  • 1,277
  • 3
  • 15
  • 41
4
votes
1 answer

Ordered classes in Python 3

I am trying to use an 'ordered class' as described in PEP 3115 (that is, a class whose members can be accessed in the order they were declared). The implementation given there is # The custom dictionary class member_table(dict): def…
James
  • 3,191
  • 1
  • 23
  • 39
4
votes
1 answer

PDO : prepare with bindvalue and like %

I've looked over an hour on various website but I couldn't solve my problem. So here is the code that works: $animes = array(); $q = $this->_db->query('SELECT id, nom, nom_id FROM animes WHERE nom LIKE "%code%"'); while ($data =…
Jérôme B
  • 311
  • 5
  • 18
4
votes
1 answer

Android: MediaPlayer onPrepared is not being called

As title says, the onPrepared() overridden method is not being called. mediaPlayer = new MediaPlayer(); mediaPlayer.setOnPreparedListener(new OnPreparedListener(){ @Override public void onPrepared(MediaPlayer mp){ if…
Zbarcea Christian
  • 9,367
  • 22
  • 84
  • 137
1
2 3
13 14