Can Read but Can't Write to a Database

hi...i'm fairly new to java and have a problem w/ a database program i have written...i'm running windows xp along w/ access xp...the program i wrote works fine on my computer, however, the program is for my brother and on his computer it only reads from the database but can't write to it...unfortunately i packed the program in a jar file so when u run the program no console comes up to display the exceptions...he is running windows 98 (first edition) and doesn't have any version of access on his computer...i figure his odbc driver is out of date or something like that but i wouldn't know where to start to tackle this problem...any help w/ be very much appreciated...thank you...

Ask him to start the app via the command line/redirect (see [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#setErr(java.io.PrintStream)]System.setErr() to a file, or use a better logging method than you are now (more info in the catches, use [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/package-frame.html]java.util.logging ).

Similar Messages

  • DVD will read but won't write A205-S5812

    My DVD drive will read and play but won't write. Device Manager says it is a Matshita UJ-850S. I have upgraded to XP Pro sp3 from vista. I suspect that it is a driver issue but I have searched and can't find one that makes it work.
    Has anyone else run into this? Any suggestions
    Solved!
    Go to Solution.

    Borsiay wrote:
    My DVD drive will read and play but won't write. Device Manager says it is a Mat**bleep**a UJ-850S. I have upgraded to XP Pro sp3 from vista. I suspect that it is a driver issue but I have searched and can't find one that makes it work.
    Has anyone else run into this? Any suggestions
    Not a driver issue, or it wouldn't even read.  You are missing the program required for disk writing that Toshiba suppiles with factory installs, but is lacking in commercial versions of Windows.  It is not available as a download, only as part of the factory image.  Since you changed to XP, You'll need to buy some disk writing software like Nero or Roxio.

  • Macbook Reads but Doesn't Write

    I can play CD's, DVD's, etc. but when I try to burn a disk, I get an error. I just finished a clean install of 10.5, didn't work, upgraded to 10.6, still doesn't work. I also repaired permissions. No luck. Any advice?

    MATSHITA DVD-R UJ-857E:
    Firmware Revision: ZF1E
    Interconnect: ATAPI
    Burn Support: Yes (Apple Shipping Drive)
    Cache: 2048 KB
    Reads DVD: Yes
    CD-Write: -R, -RW
    DVD-Write: -R, -R DL, -RW, +R, +R DL, +RW
    Write Strategies: CD-TAO, CD-SAO, DVD-DAO
    Media: To show the available burn speeds, insert a disc and choose View > Refresh

  • Php/mysql: can't write to mysql database [SOLVED]

    I'm writing a login script using php and mysql. I got it to work on my server about a week ago, and then I set up apache, php and mysql on my netbook so that I could take my code with me and test it. Now it doesn't work. My registration script doesn't write to the mysql database but has no errors. Here is register.php:
    <?php
    define("DB_SERVER", "localhost");
    define("DB_USER", "root");
    define("DB_PASS", "swordfish");
    define("DB_NAME", "users");
    define("TBL_USERS", "users");
    $connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
    mysql_select_db(DB_NAME, $connection) or die(mysql_error());
    function addUser($username, $password)
    global $connection;
    $password = md5($password);
    echo("adding $username,$password<br />");
    $q = "INSERT INTO " . TBL_USERS . " VALUES ('$username', '$password')";
    echo("query: $q<br />");
    $result = mysql_query($q, $connection);
    echo("$result<br />");
    if (isset($_POST["reg"]))
    addUser($_POST["username"], $_POST["password"]);
    echo("<a href='index.php'>click here to login</a>");
    ?>
    <html>
    <head>
    <title>Register</title>
    </head>
    <body>
    <form method="Post" name="login">
    <input type="text", name="username" /> Username<br />
    <input type="text", name="password" /> Password<br />
    <input type="submit" name="reg", value="Register" />
    </form>
    </body>
    </html>
    and here is the output (without the form):
    adding lexion,6f1ed002ab5595859014ebf0951522d9
    query: INSERT INTO users VALUES ('lexion', '6f1ed002ab5595859014ebf0951522d9')
    Also, I tried manually adding the content to the database:
    $ mysql -p -u root
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 9
    Server version 5.1.42 Source distribution
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql> users
    -> INSERT INTO users VALUES('lexion', 'foo')
    -> ^D
    -> Bye
    I would assume that I got something wrong with the last bit, but the php script seems like it should work. Does anybody know why it doesn't?
    Last edited by Lexion (2010-01-10 19:04:15)

    What is wrong with your PHP? Why do you think it is failing? An INSERT query doesn't return anything. Also, it's a good idea to specify which fields you are inserting into, unless you want to have to provide something for every field (tedious for tables with many fields with default values). eg:
    $q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('$username', '$password')";
    As for your experiment with the mysql prompt; queries have to end with a semicolon. PHP is nice and hides that little detail from you.
    edit: Also, you're echoing text out before the HTML starts. That won't produce valid HTML. I also noticed a few other things which I corrected; look at my comments:
    <?php
    define("DB_SERVER", "localhost");
    define("DB_USER", "root");
    define("DB_PASS", "swordfish");
    define("DB_NAME", "users");
    define("TBL_USERS", "users");
    $connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
    mysql_select_db(DB_NAME, $connection) or die(mysql_error());
    function addUser($username, $password)
    global $connection;
    $password = md5($password);
    // echo("adding $username,$password<br />"); - Don't echo stuff before HTML starts.
    // Also, clean up user-supplied data before plugging it into a query unless you want to be vulnerable to SQL injection.
    $cleanusername = mysql_real_escape_string($username, $connection);
    $cleanpassword = mysql_real_escape_string($password, $connection); // Obviously you'd generally use some hashing algorithm like md5 or sha1 for passwords
    $q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('{$cleanusername}', '{$cleanpassword}')"; // The backticks tell MySQL not to interpret any text within as a keyword (good for field names, eg a field called `date`. The curly brackets tell PHP that the stuff within refers to a variable; it's nice as PHP knows exactly what the variable name is with no possible ambiguity.
    // echo("query: $q<br />");
    $result = mysql_query($q, $connection);
    // echo("$result<br />"); - This won't do anything; in addition to INSERT queries not returning anything, the $result variable doesn't contain the results of the query, it's a pointer to them for use with mysql_result().
    ?>
    <html>
    <head>
    <title>Register</title>
    </head>
    <body>
    <?php
    if (isset($_POST["reg"]))
    addUser($_POST["username"], $_POST["password"]);
    echo("<a href='index.php'>click here to login</a>");
    ?>
    <form method="Post" name="login">
    <input type="text" name="username" /> Username<br />
    <input type="text" name="password" /> Password<br />
    <input type="submit" name="reg" value="Register" />
    </form>
    </body>
    </html>
    <?php
    mysql_close($connection); // Not strictly needed, as PHP will tidy up for you if you forget.
    ?>
    Last edited by Barrucadu (2010-01-10 17:34:20)

  • My DVD drive reads but does not write/copy (Satellite A60)

    I need help,I use a laptop Satellite A60-106 series
    and my dvd writer has stop writing it only copies about 3% and stops. I use both nero and roxio,
    Please help me.
    You can reply to [email protected]

    Hello Alfred
    As far as I know the small control light appear just if the drive is in use. In your case it is on constantly and in my opinion there is some problem with the device. Like Ivan already said try to remove it from device manager and let the system detect it again.
    I am pretty sure that warranty is still valid and you should contact service partner in your country. Let them check the unit.
    Bye

  • LaCie ext RW drive reads but won't write

    I want to burn something on the LaCie ext drive but it won't work. I've done it a ton of times before, but now any one of the multiple virgin CD discs that I put in (and am sure are correct and for writing) fail to show up on Toast. Also, on disc utility it says that the CD is for "read only" -- which ain't so! Think the drive just needs replaced?? (It's about 3-4 years old.) Thanks.

    Dear Cine Alter,
    If the two drives are appearing on your desktop that would suggest physical connections are OK. If you have not already done so, start up from you OSX CD and rebuild your directory. Then rebuild Permissions, Restart and see how you go. This process should clean up any directory corruptions which may be responsible for the problem. You should run both of these programs monthly to ensure corruptions do not creep into your system.
    If the problem persists restart from OSX CD and try un-mounting and re-mounting each disk with Disk First Aid. Restart and see how you go.
    Good Luck,
    Tony

  • How can I write to 4 different tables in database at the same time

    I have .mdb file which has 4 tables for each hardware, I have a labview main program which calls 4 sub programs for each hardware, all these 4 subprograms run parallely.
    One might finish one test early or late by milli seconds or seconds, the data has to be written to database file which has 4 tables inside.
    I am planning to open reference in main program and use the reference in sub programs, I will write to Table 1 for first sub program , table 2 for second sub program and so on,
    My question is can we write into one database file having 4 tables parallely/simulataneously? If no why?

    Try it.  It should work.  As long as you are opening the database once, and passing the reference around, I don't see how it would not work. 
    You may run into troubles if two subvi's are trying to write simultaneously.  If so, use semiphores to lock out the action until done. 
    Or you could use a producer consumer architecture where the producer would queue up the table name and data, and the consumer would write to the database.  The producer can be replicated in each subvi.  In other words, each subvi will contain its own enqueue code.  All subvi's and the consumer loop would have to run in parallel.
    - tbob
    Inventor of the WORM Global

  • Trying to access SMB share, can read but not write, I use the domain account to autenticate and domain account has access to the share. its a samba domain and im a Windows Admin by trade.

    I have two  I Mac's Intel i7 models.
    I have some problems getting them to write files to SMB shares.
    The domain user account I use when requested to enter when i first try to connect to the share seems to go though without a problem and it presents me with a list of mounts (shares) I select one and the folder opens, I can read files and copy them but I cant write to any of the folders.
    I have also mounted the network locatiosn to a folder from the terminal while also specifying a user name and password to use but this also doesnt allow the specified user account to write data to the share.
    I have confirmed the user account can write to the share by having the user do so from a windows box.
    any help from any of you mac guys would be great!!!!
    Im a windows fan boy / Windows Server based Network Administrator and am slowly becomming a fan of your macs (mainly due to the Unix terminal access letting me realise there is more control to be had than most haters would lead you to believe).
    Peace Out

    I should add that I originally formatted the problematic drive for FAT32 from the Mac, but then the WinXP computer couldn't see the drive when I plugged it in directly via USB. That's why I went with Seagate's utility to format it.

  • I am connecting an external USB HDD and I can see it on my Apple Macbook Air. BUT this drive is READ only. How can I write to it?

    I am connecting an external USB HDD and I can see it on my Apple Macbook Air. BUT this drive is READ only. How can I write to it?

    Drive Partition and Format
    1.Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Steps 4-6 are optional but should be used on a drive that has never been formatted before, if the format type is not Mac OS Extended, if the partition scheme has been changed, or if a different operating system (not OS X) has been installed on the drive.

  • Can Read but Can't Write to Database

    hi...i'm fairly new to java and have a problem w/ a database program i have written...i'm running windows xp along w/ access xp...the program i wrote works fine on my computer, however, the program is for my brother and on his computer it only reads from the database but can't write to it...unfortunately i packed the program in a jar file so when u run the program no console comes up to display the exceptions...he is running windows 98 (first edition) and doesn't have any version of access on his computer...i figure his odbc driver is out of date or something like that but i wouldn't know where to start to tackle this problem...any help w/ be very much appreciated...thank you...

    First, don't cross-post:
    http://forum.java.sun.com/thread.jsp?forum=54&thread=440288&tstart=0&trange=15
    Submit your question to the forum that best suits its contents. Don't try to increase your chances of getting a response by posting the same question here, there, and everywhere. It's considered rude.
    Second, if you've written a Java app that runs fine on XP, then your Java is okay. That's a good start.
    I think Windows 98 is the problem. It's rather old technology now. I would say that Windows 9x really isn't an application platform worth thinking about. You might be correct - the ODBC driver might be out of date.
    Is the version of Access you're running the same on both machines?

  • Contacts are there, but can't read anything in it, and can't write either.

    Hello,
    Contacts are there, but i can't read anything in it, and can't write either.
    The place where i should read Name, Family Name, mail adress, phone, etc is EMPTY ! All white ! The card got hos name, but there is nothing in.
    I started to use my mac book and adress book too.
    I use mac os X since the beginnning, and i never had this problem with it.
    Can someone help me please !
    Thanks

    Sounds like the Font Cache has a corrupt font in it.
    Try this:
    http://www.ehow.com/how_7197467_rebuild-font-cache.html
    If that one doesn't work, it could be the WPF font cache
    http://support.microsoft.com/kb/937135
     You'll have to delete the .dat files in C:\Windows\ServiceProfiles\LocalService\AppData\Local and restart the computer.

  • I can read but I can't write to an external drive - changing permissions

    I can read but I can't write to an external drive. 
    How do I change permissions? None of the helps here on the discussions have helped.
    Why would a computer company let me read files but not write? Hahaha. This is insane.
    I have to write computer files for work. It's a project due this morning.
    Man, I'm going to have to go back to PC.
    Just need the compter to write files.

    If it's formatted as NTFS, reformat it as MS-DOS, exFAT, or Mac OS Extended (Journaled) as desired.
    If it's formatted as FAT32 or exFAT, use the Disk Utility's Repair Disk command on it.
    If it's formatted as Mac OS Extended, click Authenticate and provide your administrator password, or change the permissions on that specific folder in its Get Info window.
    (72460)

  • Hi, the problem of deleting files / videos seeds desktop to go into Terminal and then sudo rm-rf ~ /. Trash Pohangina the answers I've had e of someone in her forum but when I write procedures line in Terminal as the Krever my password and it can not writ

    Hi, the problem of deleting files / videos seeds desktop to go into Terminal and then sudo rm-rf ~ /. Trash Pohangina the answers I've had e of someone in her forum but when I write procedures line in Terminal as the Krever my password and it can not write anything there, I write but nothing comes and my problem is not löst.När I want to delete the movie / video image Frin desktop still arrive Finder wants to make changes.Type your password to allow this. But even that I type my password file / video is left I need help in an easier way or another set-even those on the terminal that I can not type my password to solve the problem Regards Toni

    If you want to preserve the data on the boot drive, you must try to back up now, before you do anything else.
    There are several ways to back up a Mac that isn't fully working. You need an external hard drive to hold the backup data.
    1. Boot from the Recovery partition or from a local Time Machine backup volume (option key at startup.) Launch Disk Utility and follow the instructions in this support article, under “Instructions for backing up to an external hard disk via Disk Utility.”
    2. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode. Use the working Mac to copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    3. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.

  • How can i write and read the same data

    hi,
             i have attached my program to this mail. i have some problems in this program.
    problems:
    1. I want to select the threshold for the rms,varience and s.d.
    But what i used is not doing that. i want to fix the upper threshold value and lower threshold value.
     when ever the input crosses upper threshold value i want the output and it will remains uptill the value above the lower threshold value.
    Once it come down the lower threshold value the output should be stopped.
    2. I want to write this in to a  file and i want to read this file. is this possible or not. 
                please try to help me i am very new with lab view6i
           REGARDS
    CHAMARTHY KOMAL DILEEP.
       [email protected]
    Attachments:
    dileep.vi ‏93 KB

    The easiest way to perform a certain action (such as file I/O) based on a certain condition (such as whether a value has passed a certain threshold) is to use a comparison VI in combination with a case structure. Then you can specify that if your rms, standard deviation and variance are above a threshold then perform a certain action.
    Also consider using shift registers to keep track of data from the last loop. If I understand you correctly, you want to start logging data when an upper threshold has been passed. Then you want to continue logging data until a lower threshold is passed. I have attached a non-functional but explanatory VI that will help explain how to implement logic to that effect. It also demonstrates that you can indeed write and read from the same file in a loop. The best way to do this is to open the file before the loop, do all the necessary writing and reading in the loop, and then close the file after the loop.
    Hope this helps!
    Jarrod S.
    National Instruments
    Attachments:
    dileep_example.vi ‏61 KB

  • Can't write automation with anything but the mouse on the track

    I just upgraded to logic studio and now I can't write automation. I click and drag the volume bar on the channel strip, the playback volume goes up, but the automation line does not change. In touch, latch or write modes this occurs. I noticed the problem with my behringer bcf2000, but it happens even when I disconnect the hardware and just use the mouse. The only way I can adjust the automation is to use the mouse in the horizontal track and adjust the lines. I hope there is some simple toggle I need to click to re-enable this. Can anyone help me please? I do not have this problem in logic pro 7

    Hi there!
    I had the same problem, - and found the same answer, - but now I find that the "Write automation for: Volume" checkbox actually unchecks itself... I check it and forget about it but when I come back later in the process to change the volume automation I find it unchecked. This only happens to the volume checkbox though. Any ideas why?

Maybe you are looking for

  • New Applescript version breaks old code

    Hi there, First off, I'm not an Applescripter, but I have one script I wrote a few years back (with help from kind people on the net) to generate and save tiny applications which, when called from within an Adobe Flash executable, would open the requ

  • When i click Yahoo mail, firefox is closing, says send error report or close

    The new Yahoo Mail is updated, so when i open yahoo mail, the browser says " firefox encountered... error . Send error report or close". This is the error window dialogue box appear. After that, the complete firebox browser closing, how do i open my

  • Safari does not work after Mountain Lion download.

    Downloaded Mountain Lion 10.8.2.  Got system up and running.  Safari icon is present, but will not respond--cannot get on line.  Firefox works normally, though.  Tried downloading Safari update--no luck.  Ideas? Solutions?

  • Query Adobe License Keys in 6.0

    Does anyone know of a way to query the license key used on a local client without having to visit each desk? Version 4 and 5 provided the key simply in the registry- hklm\software\microsoft\windows\uninstall\adobe..\productID- but this is not found a

  • Distribution mobileprovision and Developer mobileprovision what kind of files can be uploaded

    Distribution mobileprovision and Developer mobileprovision what kind of files can be uploaded Hi Im trying to opload Distribution mobileprovision and Developer mobileprovision files in the DPS Viewer Builder, but cant see what i need I have tre .p12