Error On Update Or Insert Data But No Message
I have an application on asp and mysql 5.0, connecting with ODBC 3,51. When the application insert data or update data, MySql don't send error message, but the data don't update or insert. The transaction is ignored!!!!. Then, on my application I can't detect error. My code:
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_base_STRING
Command1.CommandText = "UPDATE EXAM SET MaAnt='"&MaAnt&"',Mois='"&Mois&"',Annee='"&Annee&"',[...]WHERE Id_Exam='"&id&"'"
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
Have anybody an idea?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Update / Insert Data Using CSV File
I need to update a field in my database using a CSV file. The database already has the Product Number (pNUM) and I need to add Wholesale Price (pWholesalePrice). The file I have is fomatted as follows: AC1074,48 AC1076,60 AC1076A,60 AC3515,60 AC3521,60 P1207,78 AC2300RH,42 etc... I would need to do some sort of UPDATE that would find the product number and insert the corresponding wholesale price. I can't imagine this would be difficult if I knew what I was doing.
INSERT Or UPDATE Depending On Row Data....
I have a form that submits to a php script which in turn sends the data to a table in a mysql database. $sql = "INSERT INTO scores (scoreid, xuser, xscore) VALUES ('', '$_POST[xuser]', ('$_POST[xscore]'))"; $result = @mysql_query($sql,$connection) or die(mysql_error()); ?> This is the main section of that specific script at the moment. As can be seen, there are three fields, scoreid, xuser and xscore. What i want to do is Insert a new users score as it is currently done so, HOWEVER, if the user already exists in the database then instead of a new tuple being entered for them, how can i do it so that their old tuple is overwriten/updated instead?
Truncate Tabel And Insert Data How To Update Indexes?
Once every day our financesystem updates data that I uses for my database. Some tables I truncate and reinsert data to get the latest changes in our customer and prospect database. Others I delete from a certain date to obtain best economical data and finally one database with 14M records I add records that has been added since the day before. What I find is a very slow system and the funny part (but I think understandable) is that if I do not update for lets say a week (because I test stuff) the queries are fast and smooth. That tells me that the problem is indexing. So if I truncate a table, how to update indexes or can I do that at all? The Optimize tabel doesn't help me here :( I use MyISam and not InnoDB would that make any changes? What about indexes are they needed (those I create)? or can MySQL handle that better?
INSERT/UPDATE W/data Conversion To UTF8 (ex: Josè Feliciano)
I have the following string of "Josè Feliciano", when I insert/update into the mysql db I need the db to convert the [è] to the UTF-8 value of [è]. Is this possible via the db... I'm sure it is... if so, how? I have also tried the following and do not see the expected result. CONVERT(_latin1"Josè Feliciano" USING utf8) Also, when I do use CONVERT it chokes when there is a single-quote in the value that I am inserting... even with the value is surrounded by double-quotes. What is up with that. CONVERT(_latin1"Ramblin'" USING utf8) ?? CONVERT(_latin1'Ramblin'' USING utf8) ??
Unable To Insert Data (Error 1064)
I'm having problems with inserting data. When I try to insert data into the database manually, I get the Error 1064 ( You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use) If I use HeidiSQL to insert data it works just fine but does not work if I type in the query or if I copy the query generated by Heidi and execute it manually. This is creating problems for writing procedures. All other queries work fine.
1146 MySqlCC Error Cant Update Table Data
I am working with MYSQLCC (Control Center) and when I try and add data to a table using the run query it errors out with error 1146. error 1146. table rossoptical.1 doesn't exist. my table name is asphericallenses It seems like there is a reference pointer problem! This is my first time using the MYSQLCC and I dropped the table and recreated it with all of the data. I Still the same problem. I have read a lot about other problems here and I think I have done everything suggested. even when I run the select query I get the same problem, but I do see the columns of data, I just can not change the data.
Need Help With Error Message
I'm getting this error message -- can someone spot the error? I'm using 5.0. CREATE TABLE saAuthorizations( authID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT , insuranceID INTEGER UNSIGNED NOT NULL , authNumber VARCHAR NULL , startDate DATE NULL , endDate DATE NULL , totalNumOfSessions TINYINT UNSIGNED NULL , numSessionsRemaining TINYINT UNSIGNED NULL , address1 VARCHAR NULL , address2 VARCHAR NULL , city VARCHAR NULL , state VARCHAR NULL , zip VARCHAR NULL , phone1 VARCHAR NULL , phone2 VARCHAR NULL , fax VARCHAR NULL , notes TEXT NULL , PRIMARY KEY ( authID ) ); MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL, startDate DATE NULL, endDate DATE NULL, totalNumOfSessions TINYIN' at line 4
Error Message
I am trying to install MYSQL 4.1 and I keep getting the message "Resource (messagedlg.confirmation) not found." Installation does not proceed. What does this mean and how do I correct it?
Error Message
I'm having a great deal of unsuccess with ascertaining what could be causing the following error when executing a stored procedure. Here's the error message: "#42000 OUT or INOUT argument <param#> for routine <procname> is not a variable" I've got some stored procs with OUT params and they do not cause problems. But I have one stored proc that does. Could I have reached a limit of some kind with the number of parameters I'm using? I have 35 parameters. 34 are input only, 1 is OUT. If I comment out the single OUT parameter in the procedure's declaration, there are no errors on execution. But the OUT parameter in question is there to return the LAST_INSERT_ID() of an insertion that occurs inside the stored proc. I NEED that value so I can do other things with it elsewhere. This error occurs whether or not I assign a value to the OUT parameter. Anyone have a clue what's wrong here? Is it me, or have I discovered another bug?
Error Message During Set Up
I've gotten the fo;;owing message while trying to set up MYSQL on a Powerbook on MacOSX: /usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! I installed Startup, Debug, Max, and Standard in that order.
Error Message
I am getting this message on my site "Table 'theweb_joomla1.jos_joomla_section' doesn't exist SQL=INSERT IGNOR INTO jos_joomla_sections (sectionid, commented, locked) SELECT id, 1,0 FROM jos_sections"How can I fix this problem? I know it tells me in the instructions but I am not savy enough to understand it.
Error Message
I cant seem to get this to work.I am trying to install a cart, and created a database "cart". I have then added a user and password. But now I am getting Warning: mysql_connect(): Access denied for user: 'brooke@localhost' (Using password: YES) in /home/witha/public_html/store/stconfig.php on line 15 Unable to connect to database
Error 2003 Message
I am getting an Error 2003: Can't connect to MySQL server on 'machine' (113) message when trying to connect remotely to a MySQL database on Linux. THis is using this command mysql -h machine -u web -p I can connect to the database OK on the local machine using the same command. The user I set up like this with permissions - GRANT SELECT ON database_name.* TO 'web'@'%' IDENTIFIED BY "password"; Has anyone any ideas why I can't connect remotely.
ERROR Message 1226 What Do I Do?
I am new to the MySQL world..... and well I have a problem I changed the "Max_questions" to 10...and in doing so I am now locked out of everything...what do I do? The error just says Max_questions reponse = 10 (1226)
Need Help Understanding Error Message
I'm not terribly experienced with databases. Can someone tell me what's wrong with this query? I've included the error message below - I'm not sure what it's telling me or how I fix it. CREATE TABLE saClient( clientID INTEGER UNSIGNED NOT NULL , firstName VARCHAR NOT NULL AUTO_INCREMENT , middleName VARCHAR NULL , lastName VARCHAR NULL , address1 VARCHAR NULL , address2 VARCHAR NULL , city VARCHAR NULL , state VARCHAR NULL , zip VARCHAR NULL , birthday VARCHAR NULL , ssn VARCHAR NULL , fax VARCHAR NULL , email1 VARCHAR NULL , email2 VARCHAR NULL , phoneCell VARCHAR NULL , phoneHome VARCHAR NULL , phoneWork VARCHAR NULL , phoneOther VARCHAR NULL , emergContactName VARCHAR NULL , emergContactPhone1 VARCHAR NULL , emergContactPhone2 VARCHAR NULL , emergContactRelationship VARCHAR NULL , sex TINYINT UNSIGNED NULL , notes TEXT NULL , STATUS TINYINT UNSIGNED NULL , PRIMARY KEY ( clientID ) ) MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL AUTO_INCREMENT, middleName VARCHAR NULL, lastName VARCHAR NULL, ' at line 3
Error Message: C:mysqinshareenglisherrmsg.sys
[color=blue] >Trying to start first time using command: > C:mysqlinmysqld --standalone > > Yields this error message: Can't find > messagefile'C:mysqinshareenglisherrmsg.sys' aborting > > Now in C:mysqlshareenglish there is an errmsg.sys[/color] Do you have any language=C:/mysqin/share/english/ entry in the my.ini? -- Thanks for the Reply ... It sounds like I need to add:..................
Socket Error Message
I'm getting an error message I don't understand: "Could not connect to MySQL: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)" Can anyone shed any light on this error for me?
Error Message - 1251
I've recently upgraded MySQL to 4.1 and am tryingto get an old PHP based website to work and I'm receiving the message: Login Validation Failed: 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client - Make sure your Username, password and hostname are correct. " Searching this site for information on how to solve my problem a reference indicates that I should - "Upgrade all client programs to use a 4.1.1 or newer client library. When connecting to the server with a pre-4.1 client program" What does "pre-4.1 client program" mean? Is this referring to PHP?
MySql Error Message
I have a perl application. I sometimes get the following error: Can't connect to MySQL server on '127.0.0.1' (4) What means the (4). I can't find any answers. I know (111) is when the server isn't running !!!
Get A Meaningful Error Message
I have msAccess clients running smoothly with MySQL backend via ODBC. When I test the execution of various invalid sql statements the only error received is 3146 ODBC call failed. Is it possible to query MySQL to discover more detail regarding the last error and return a more meaningful message?
Error Message 1062
i have just restored a backup of all me databases after i messed things up with my website, anyways the back up went ok but i got the following errors ERROR 1062 at line 241: Duplicate entry '179' for key 1 ERROR 1062 at line 242: Duplicate entry '180' for key 1 ERROR 1062 at line 243: Duplicate entry '181' for key 1 ERROR 1062 at line 244: Duplicate entry '182' for key 1 ERROR 1062 at line 245: Duplicate entry '183' for key 1 ERROR 1062 at line 246: Duplicate entry '184' for key 1 ERROR 1062 at line 247: Duplicate entry '185' for key 1 ERROR 1062 at line 248: Duplicate entry '186' for key 1 ERROR 1062 at line 249: Duplicate entry '187' for key 1 ERROR 1062 at line 250: Duplicate entry '188' for key 1 i am having a couple minor prob with my site and thoought it may be linked to this. explain what this means and how to correct it.
Error Message Language
I have two problems about the Error Message Language: 1. If I set language directory path in MySQL Administrator, then nothing is happen: language remains English and, after restart MySQL Administrator, path writen in Startup Veriables -> Advanced -> Localization -> Language is changed (some characters missing). 2. When I change errmsg.txt and want to generate new errmsg.sys with "comp_err errmsg.txt errmsg.sys" command (as HELP guides), system returns error: "'comp_err' is not recognized as an internal or external command,operable program or batch file."
Getting Value Replacement For %s In Error Message
when database engine product some error i can get it mysql_errno -- Returns the numerical value of the error message from previous MySQL operation mysql_error -- Returns the text of the error message from previous MySQL operation Example: Error: 1062 SQLSTATE: 23000 (ER_DUP_ENTRY) Message: Duplicate entry '%s' for key %d how can i get value, what is using as replacement %d for example or where are stored values for replacement in error mesages? Have access to it?
Meaningful Error Message
I have msAccess clients running smoothly with MySQL backend via ODBC. When I test the execution of various invalid sql statements the only error received is 3146 'ODBC--call failed’. Is it possible to query MySQL to discover more detail regarding the last error and return a more meaningful message?
Code Does Not Execute, But No Error Message Given
I used the info from Kevin's Database Driven Website book to construct the following code. It displays without errors. But when I enter info, the info is not entered into the database, and no error message indicates that anything went wrong. When I query the database directly, no data had been entered. I need another pair of eyes to look at this and tell me where I went wrong.
Form Submission Error Message
What could be the source of this error message Error : Duplicate entry Ɔ' for key 1 I get when i fill a php/mysql form?
Error Message MYODBCConfig, When Trying To Connect
I am attempting to connect to a MySQL file through Excel. To do this I have installed the MySQL 3.51 driver and gone through the steps to Add a Data Source but come up empty handed. I get this error: "could not find driver {MySQL ODBC 3.51 Driver} in system information" I have gone through the setup through the ODBC Data Source Administrator. I have tried adding this through the User DSN and the System DSN and run into the same error. So, here are my setup inputs. In the Add Data Source Name Dialog Box: Data Source Name: Myodbc (I have left all the following boxes blank, and no luck and so now I am putting some input in them just to see if a positive outcome is possible, but the results are the same) Description: Online Store Server: localhost User: Password: Database: (click the dropdown box and I get an error immediately, either access denied or cannot connect to MySQL sever on localhost. I have pinged my localhost and pinged 127.0.0.1 and both are successful reaching the destination. I have also tried installing this on a second computer and am unsuccessful too. Machine 1 is Windows 2000 with Excel 2002 and Machine 2 is Windows XP with Excel 2003.
SELECT DISTINCT Error Message
I am using php 4.3.10 and mysql 4.1.9 on Windows Server 2003 I can SELECT Update insert delete just fine but when I use the DISTINCT keyword it craps out saying "table 'table_#SQL_43_34' is read only" I have a feeling it has somethig to do with making a temporary table or possibly permissions but dont know how to rectify.
Mysql 4.1.16 Win32.msi Error Message
I have downloaded mysql 4.1,16 win32.msi for use with sam broadcaster. The download and set up were successfull but when I try to execute I get: mysql can not start error 0.
Mysql Server Hangs Without Error Message
We are using a huge mysql DB, with nearly 1000 connections on it. The instance uses myisam and innodb with innodb_file_per_table option. The server version is 4.1.16. The problem we get is that on high utilization the database hangs. All threads are showing sleep or query on processlist but nothing happens. You can connect with the mysql client but the database suplies no data. No error messages were dropped to the logfiles. Restarting the instance and everything works fine till the next crash.
Can Error Message Show Entire Sql Query Instead Of Excerpt
I'm running MySQL 3.23.58 on Red Hat Linux 9. In my web server error log I see things like: [Thu Jan 18 00:33:56 2007] [error] [client 72.86.29.196] DBD::mysql::st execute failed: You have an error in your SQL syntax near ' (NOW(), "Setup [precheck] failed for 72.86.29.196 port 1239 [72.86.29.196] (Con' at line 1 at /var/www/html/blah/mysql-help.pl line 34. Is there a MySQL setting I can change somewhere so that it will log the entire SQL query that generated the error, instead of just an excerpt? It's a lot easier to figure out what went wrong if I can see the whole query.
Error Message: MYSQL RealTime: Failed To Connect Database Server Asterisk
I have installed asterisk version 1.2.14, asterisk-addons 1.2.5 and mysql version 4.1.21. on Red Hat linux version 9.0. I created the database 'asterisk' in mysql so that the asterisk cdr record can be stored in my sql. I has edited the asterisk modules.conf to load cdr_addon_mysql.so and also change the configuration in cdr_mysql.conf. Finally, i do a reset on asterisk. I got the below error message after i reset my asterisk. Error [6825]: cdr_addon_mysql.c:231 mysql_log: cdr_mysql:cannot connect to database ERROR[6969]: res_config_mysql.c: 651 mysql_reconnect: MYSQL RealTime: Failed to connect database server asterisk on (err 1045). Check debug for more info.
Error Message Warning: Printf() [function.printf]
In my php code i have... <?php mysql_connect("localhost", "my-username", "my-password") or die(mysql_error()); mysql_select_db("my-database") or die(mysql_error()); $result = mysql_query("SELECT * FROM beavers_news ORDER BY posted DESC"); if ($row2 = mysql_fetch_array($result)) { do { Printf("<table width='100%'><tr><td>%s</td></tr><tr><td>Posted: %s</td></tr><tr><td>%s</td></tr></table>", $row2[title], $row2[posted], $row2[news]); }while ($row2 = mysql_fetch_array($result)); }else{ echo "There is no news!"; } ?> And i add news into the mysql database, but when i go to view the page i get the following error message... Warning: printf() [function.printf (http://www.southwaterseascouts.org/scouts/news/function.printf)]: Too few arguments in /home/sites/southwaterseascouts.org/public_html/scouts/news/index.php on line 55
UPDATE Or INSERT
Kind of worked myself into a weird place in my current application. Where I find myself at is with a single form that is supposed to handle both updates of existing rows and insertions of new rows. The way I want this to work is: 1) If the ID is specified and references a valid row, update that row 2) If the ID is specified but does not reference an existing row, insert a new row 3) If the ID is not specified, insert a new row Now, (3) is easily done in my application - just test if the ID was specified by the user. Simple. Nothing to it. What I'm wondering is if there is a way to do both (1) and (2) in a single MySQL query and receive feedback such that I can in my application inform the user whether an update or an insert took place. I could do this with two seperate queries (query for the ID; if I find the row update it, otherwise insert a new one), but I'd like to do it with a single one if possible (mostly because I want to expand my skills with complex SQL queries).
Update Or Insert Sql
I am using this query to update tableone based upon the values in tabletwo. I really like this query because it works very fast. PHP UPDATE tableone n, tabletwo c SET n.sec = c.sec, n.cat = c.cat, n.published = 1 WHERE n.section = c.section AND n.category = c.category This works great however I cant seem to get it to insert or append if the data already exists. It just overwrites the data. My difficulty is that I need certain columns to be updated (overwriting the data) and other columns to be inserted or appeneded to (adding to the data). Is a stored procedure the best way of doing this? Or, is there a way of adapting my sql to cater for this?
Need To Use UPDATE Instead Of INSERT INTO
I need to UPDATE exisiting rows and populate the fields using only the resources in this INSERT statement. INSERT INTO cms.project_event (projectPhaseID,sortOrder) SELECT cms.projectTemplate_eventTemplate.projectTemplatePhaseID, cms.projectTemplate_eventTemplate.sortOrder FROM cms.projectTemplate_eventTemplate WHERE cms.projectTemplate_eventTemplate.projectTemplateID = '1' Any clue pointing in the right direction will be of great help. Im not providing alot to go on just the to update the two fields from the other table instead of INSERTING new rows.
Last Update/insert
Can I know the time when the last UPDATE or INSERT occur in a table in a database?
UPDATE And INSERT In One Go?
Is it possible to create a query that will do an UPDATE or an INSERT depending on certain data already in the database? Eg I'd like to record a user's vote. If this user hasn't voted already, an INSERT is called for, otherwise an UPDATE. Right now, I'm SELECTing first, checking whether the user's id is already in the votes table, and if yes, my query's an UPDATE, otherwise it's an INSERT. This needs two hits on the DB however, and I'm someone who likes to limit the amount of DB hits as much as possible.
Update And/or Insert?
I'm using MySQL with PHP. I want to update a record if it already exists. If it does not exist, I need to create a new record. Is this done through a simple SQL command, or do I need to use PHP to negotiate two separate UPDATE and INSERT statements?
After Insert, After Update
I am taking my first and last class in programming as I can't make sense of the textbook or teachers instruction (but I am determined to get at least an A or B in this class.) So if anyone could tell me in VERY simple terms how to write an after insert and after update trigger I would be very much grateful.
INSERT / UPDATE
I'm having trouble using the IF statement. What I want is to do either a INSERT or a UPDATE depending on the SELECT statement. No mather what i do, it gives me an error on the INSERT statement. Isn't allowed to have a INSERT/UPDATE statment inside a IF statement? This is what i'm trying: SET @param = (SELECT) IF @param IS NULL THEN INSERT... ELSE UPDATE... END IF
INSERT Or UPDATE
I need using a SELECT statement, but is there a way to make this work on INSERT or UPDATE statements as well? In other words, I can do: SELECT MONTH(deadline) FROM projects ... But can I do something like: UPDATE projects SET MONTH(deadline)='11' ... where the rest of the date stays the same, but only the month is updated? Doesn't seem to work, and I don't see any examples in the manual comments, but it sure would be nifty.
Update Or Insert
I have to create a database with 8.000 entries. It will be the top entries it will have. Now... what is faster ? a) to create the table before with 8.000 rows and the id field from 1 to 8.000 (primary key...) and then do UPDATE's b) to create the rows as they have to be created with INSERT's ? In the middle of the process it will be SELECT's from other users.
Insert If I Can't Update
I check for the data to exist. If it does, I UPDATE, otherwise I INSERT. Is there a way to do it better, more efficiently?
UPDATE Or INSERT
I am looking for a solution to an update-type problem. Users enter name, address, etc etc. I have set the first_name & last_name fields to be jointly unique, so that no two records can exist with the same first and last names the same (e.g, no 2 records with 'Joe Bloggs' as first/last names.). Now if users want to correct, say, their address, it will not allow them to since a record already exists with their first/last name. Is there a SQL statement that will allow me to bypass the UNIQUEness constraints when other fields need to be updated? (And related, if the UNIQUE fields are updated, it currently creates a new record but leaves the old one there. I need to overwrite the old record but keep the same ID number primary key.)
INSERT/UPDATE
I've got an array in PHP, which is identical to a row in mysql: Code: array ( 'key' => 'somekey', 'column1' => '...', 'column2' => '...', 'column3' => '...', ); If 'somekey' does not exist in the table, I want to INSERT this array as a new row. Otherwise, I want to UPDATE the row which has the key 'somekey'. Is it possible to do this in a single query? Cause now, I'm first INSERTing a row and if that fails, I try an UPDATE instead.
Insert/update
I have a table of x/y values and a set of 'new' x/y values. For each of my new x values that already has a record in the table, I want to add the new y value to the corresponding existing y value. If there is no x value in the table, I want to create a new record with the new x/y values.Is there a simple (atomic) way of doing this?
Update / Insert / Delete Log
I'm wondering if there is any way to get a lot of recent update/insert/delete statements performed on a db by a particular user?
|