Is this preparedSatement possible?

G'Day, G'day!!
I am just wondering if this is possible?
I am using MSAccess and have a practice table with 3 columns, a gui with 3 JTextFields and a button called save, when I click on save I want the preparedStatement to insert the values into the database. I'll post the relevent code.
if (e.getSource() == save){
//I'llskip the connection code for brevity
try{
boolean abool;
String a = textField1.getText();
if(a.equals("")){abool = false;}
if(!a.equals("")){abool = true;}
String b = textField2.getText();
Stringc = textField3.getText();
PreparedStatement pstmt = con.prepareStatement("INSERT INTO TIMESHEET VALUES ( "+
pstmt.setBoolean(1, abool);
pstmt.setString(2, b);
pstmt.setString(3, c);
pstmt.executeUpdate();
pstmt.close();
con.close();
}catch(SQLException ex){System.err.println("SQLException: " + ex.getMessage());}
As it runs now, I get the error:
SQLException: [Microsoft][ODBC Microsoft Access Driver] Optional feature not implemented.
I haven't run into this error before, does that mean that my driver does not support this function or am I doing something wrong?
I have used preparedStatements in the form of
PreparedStatement pstmt = con.prepareStatement("UPDATE TIMESHEET SET "+
"COL1 = ? WHERE NAME LIKE ?)";
pstmt.setFloat(1, 2.25);
pstmt.setString(2, myname);
pstmt.executeUpdate();
And this works perfectly fine, if anybody could offer a brief explanation that would be great. I have searched all 114 archives on preparedStatements and couldn't find an answer, and I am sure it is a simple one!!!!
Cheers and Thanks alot!! Oz.

Actually disregard,
I am really sorry to have wasted you time. I found the problem.
In my text program it was actually
boolean abool = true
String a = text1.getText();
if(a.equals("")){abool = true;}
if(!a.equals("")){abool = false;}
String b= text2.getText();
String c= text3.getText();
float f = Float.valueOf(c).floatvalue();
(the cols were -col1 bit, col2 varchar(10), col3 float)
and the pstmt was actually
pstmt.setBoolean(1,abool);
pstmt.setString(2,b);
pstmt.setFloat(3.f);
so I changed the last one to pstmt.setString(c) which is in the format of a float and it took it that way.
But I don't understand why it wouldn't take the setFloat, and gave the option new implemented error?
Once again i apologize, learners error!!!

Similar Messages

  • Hi, I'd like to set alarms or reminders on my I phone or I pad so that it can update or sync automatically with each other. I don't know if this is possible or how to do it. I hope you can help..

    Hi, I'd like to set alarms or reminders on my I phone or I pad so that it can update or sync automatically with each other. I don't know if this is possible or how to do it. I hope you can help.

    HI, if I did this, then I believe that I cloud would then hold my info which I don't want. Is that the case? The reason is that I'm an old git, therefore used to not giving out info. Would I be right?
    Thank-You so much for taking the time to answer.
    John.

  • HT4436 I both have iCloud accounts and would like to share photo's etc. Can any one please advise if this is possible and how to do it?

    My wife and I both have iCloud accounts and would like to share photo's etc. Can any one please advise if this is possible and how to do it?      
    I have a Macbook-pro and Ipad, my wife has a much loved ipad.

    It's all described in iCloud Help here: http://help.apple.com/icloud/#mmc0cd7e99

  • I'm trying to find out how to export my apple contacts to the Salesforce software and they need to be in a csv format and I don't know if this is possible and how to do it if it is?

    I'm trying to find out how to export my apple contacts to the Salesforce software and they need to be in a csv format and I don't know if this is possible and how to do it if it is?

    I think there are third-party programs which will do that, but you can also do it with Automator:
    See the links in my post, here: https://discussions.apple.com/message/22390873#22390873
    The file or clipboard contents will be in Tab Separated vars, so you'll have to open with a spreadsheet program and save as Comma Separated Vars format.

  • I recently bought a new iMac as well as a wireless time capsule and have it connected how can I use this external drive as the location to store all my files for iTunes, or is this even possible?

    New iMac user here, I recently bought a new iMac and Time capsule and have the whole network up and running now. I have connected another external HD to the time capsule as well and have a total of 3 TB of storage connected wireless to my new iMac. My question is can I use this location as the default location for iTunes?  I doubt I am gonna run out of room considering the iMac has 1 TB of storage already, but I'd prefer to keep my movies and music off the Mac to keep it running smoothly. If this is possibly, I'd like to do this with iPhoto as well. 

    I would advise against placing your iTunes library on a Time Capsule.
    The Time Capsule is designed as a backup device and not for wireless streaming of video.
    Before you do anything more, can I suggest you put into place a reliable, redundant backup strategy.
    Unless you are prepared to risk loss of your iTunes library due to a hard drive failure, I would not put iTunes on the Time Capsule.
    Leave your iTunes library on your iMac until such time as your internal drive is full. Backup to Time Capsule using Time Machine and create a clone of your internal iMac HD to your external drive.
    That's my 2 cents worth. Others may have a different opinion.

  • MacBook Pro battery had accumulated more than a 1000 charges, and stopped functioning unexpectedly. Went and got the battery replaced. Just saw that SMC Firmware 1.6 update deals with this. Possible to get my money back?

    MacBook Pro battery had accumulated more than a 1000 charges, and stopped functioning unexpectedly. Went and got the battery replaced. Just saw that SMC Firmware 1.6 update deals with this. Possible to get my money back?

    The firmware update corrects an error that may occur, however the techs would have checked the condition of the battery prior to installing a new one.  If the battery was questionable, the firmware update was really not too important.
    You can check the battery condition by going to the apple, left side of the menu bar, About This Mac, More Info, System Report, Hardware, Power and see what it says about Cycle Count, Condition, Capacity: Condition anything but Normal needs to be checked and may need to be replaced.
    The cycle count of 1,000 charge cycles is the typical life of a Lithium-Ion battery, the point at which the capacity drops to 80% of the as built capacity.

  • How can i see when someone has accessed my call/text log. (This is possible on google) I have been informed that someone has accessed my activity log and is giving my information to a third party. I believe it is a service tech, but I am not interested in

    How can i see when someone has accessed my call/text log. (This is possible on google/gmail) I have been informed that someone has accessed my activity log and is giving my information to a third party. I believe it is a service tech, but I am not interested in persuing that further. I just need to see when my account has been accessed if possible.

    Hi lynniewigs,
    This is a common concern among Android and I-phone user, and one of the drawbacks to using a smart phone.  We lose so much privacy. Our phones become cameras into our homes for us to be spied on.
    I don't know what type of phone you have, if it is even a smart phone, but here is an example of an application that you can use to determine which applications are accessing your information and sending it out. 
    Permission Scanner - Android Apps on Google Play
    Google just recently revamp their permissions geared to hide invasive applications that spy and send out your information without your knowledge.  Report says be aware of what your Android app does - CNET
    Please continue to be mindful of the apps you download and the permissions you give. 

  • When using Firefox Sync on multiple devices, I used to be able to 'send' a tab from one computer to another. Is this still possible? If so, how?

    When using Firefox Sync on multiple devices, I used to be able to 'send' a tab from one computer to another. Is this still possible? If so, how?
    I don't mean the ability to see what tabs are open on another device (I know how to do this). But if I am at work and find something that I want to read at home, it would be helpful to 'send' the tab to my home PC so that when I return home, it will automatically open that tab for me.

    Can anyone help?

  • Is this a possible bug on the Facebook app for iPhone?

    I tend to suffer from slight paranoia regarding security online and on my phone. I'll try to explain the worry I'm having as best I can.
    Basically, I had a personal video on my phone, (nothing horrible don't worry), but it's of a nature that would be embarrassing to be seen by other people.
    So this video was the latest thing I had recorded/taken with my phone. I went onto the Facebook app on my iPhone to post an older picture I had to my page.
    When I saw that this video was still on my phone, I panicked and worried that it could somehow get posted to my page without me actually posting it e.g. a bug whereby the last picture or video taken would go onto your Facebook without you actually selecting it or posting it. So I deleted it while still on the grid page where you choose your photos/videos and so it disappeared when I went back to the app.
    Can anyone with 100% honesty tell me one way or another if this is possible? If I haven't explained it enough let me know and I'll explain it further. Again, please be honest cos it's the best thing for me. Thanks.

    It may be in Facebook, but Facebook doesn't consider it a bug; it's the way Facebook works. If you gave the app permission to view your photos it gives Facebook access to ALL of your photos. To put your mind at ease go to your Facebook page on your computer and see if it's there.
    If you are concerned about privacy online you probably shouldn't have a Facebook page

  • Is it possible to connect my 2008 black macbook, to my new 2014 macbook pro retina display screen to make a dual monitor. If this is possible what cables would I need to buy?

    Is it possible to connect my 2008 black macbook, to my new 2014 macbook pro retina display screen to make a dual monitor. If this is possible what cables would I need to buy?

    You can try using Screen Sharing in the Sharing preferences. Or try a third-party utility such as ScreenRecycler.

  • This is possible in InDesign CS5.5 using Folio Builder (DPS).

    Hi DPS Experts,
    I am new to this DPS work flow.
    I am using InDesign CS5.5. I have the question? This is possible to create the apps for the below mentioned web link.
    http://www.spanish-real-estate.co.uk/
    The website is in joomla and the domain is www.spanish-real-estate.co.uk
    The app will be free so I am not sure if this will need apple store approval.
    If it possible please any one help to or guide how to I start the process how to uploaded the files in DPS and how to check it out the video and audio and everthing like in the website to be embeded in the iPad Apps.
    Please give the path to achieve this goal.
    thx,
    csm_phil

    Out of curiosity, why do you want your app to look like the actual website?
    And Yes every app goes through an approval process before it appears in the app store.

  • Is this graph possible?

    Does anyone know if this kind of graph layout is even possible in Keynote or Pages? What would I have to use to achieve it?
    Thanks in advance!
    <table style="width:194px;"><tr><td align="center" style="height:194px;background:url(http://picasaweb.google.com/s/c/transparentalbumbackground.gif) no-repeat left"></td></tr><tr><td style="text-align:center;font-family:arial,sans-serif;font-size:11px">Keynote</td></tr></table>

    I still haven't found out whether this is possible. Could anybody help?

  • Is this effect possible?

    Can anyone help me determine if this effect is possible in
    flash? I've created a video to show the effect, heres the link:
    http://www.mediafire.com/?sharekey=db70f6709325bacd1bee9a6e9edd9c76e04e75f6e8ebb871
    Its only 2mb video. Basically what happens is this: When you
    move the cursor around the page, the "shine" inside the logo
    changes. So think of it this way, there's an image file (a shiny
    texture) that follows wherever the cursor is, and the image is
    masked inside of the logo, so that when you move the cursor around
    you see the texture inside the logo moving with you. Anyone know if
    this is possible? Or anyone have ideas on how I can achieve a
    similar effect?

    sure you could do something like that with moving an item in
    the x,y directions related to mouse movement. the demo is related
    to calculating the angle of the mouse and rotation. you can do
    something similar with a percentage based on the mouse position and
    scroll an image under a mask accordingly.
    and now that you say that - i totally see what was happening
    in the vid ;)
    give me a bit and I'll put a demo up.

  • How is this even possible? Folders out of sync. Backlog command says in sync.

    Two 2008 R2 servers.  Been running DFS-R for about a year now.  Generally no problems.
    If I run the DFSRdiag backlog command on either server, for one particular folder, it says there is no backlog.  The only problem with that is;  on one server there are 11 files in that folder, on the other server, in the same folder, there are
    15 files.  How is this even possible!

    Hi,
    Please check if DFS Replication filter some special file from replication. For more detailed information, please refer to the article below:
    Exclude files or subfolders from replication
    http://technet.microsoft.com/en-us/library/cc758048(v=ws.10).aspx
    If the issue still exists, please create a Diagnostic Report to see if there is any error message.
    Create a Diagnostic Report for DFS Replication
    http://technet.microsoft.com/en-us/library/cc754227.aspx
    Best Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Is This Even Possible? eDirectory syncing passwords with external RADIUS servers.

    We are currently have a solution that allows us to use a campus RADIUS
    server as the authentication mechanism for accessing the Internet. We want
    to integrate this so users can authenticate with their campus IDs but gain
    access to the Novell server (home directory and printing) using the same
    information.
    Is this even possible?
    So, essentially, we would like the external RADIUS' user/password data to
    be synced with the eDirectory data, but have the eDirectory receive updates
    from the RADIUS (or LDAP, Kerberos or whatever system is necessary). Or is
    an all-Novell solution the only possible way to use RADIUS authentication?
    Any input would be greatly appreciated.
    -=Bryan

    Hi Bryan,
    As jim said, you can use idm to do this, but another option for you
    might be to use somthing like freeradius and point it back to
    edirectory as its authentication source.
    Cheers,
    Steve
    On Thu, 23 Feb 2006 15:50:11 GMT, [email protected] wrote:
    >Michael,
    >
    >Thanks for the info. I really wasn't sure where to post this question. I
    >really wasn't sure if I needed to be using Novell's RADIUS server or not to
    >do this. Reading the online docs didn't really help me to know which
    >solution or solutions to choose.
    >
    >-=Bryan
    >
    >> [email protected] wrote:
    >>
    >> > Is this even possible?
    >> >
    >> > So, essentially, we would like the external RADIUS' user/password data to
    >> > be synced with the eDirectory data, but have the eDirectory receive updates
    >> > from the RADIUS (or LDAP, Kerberos or whatever system is necessary). Or is
    >> > an all-Novell solution the only possible way to use RADIUS authentication?
    >>
    >> What you want should be possible with Novell Identity Manager (formerly
    >> DirXML) product. This particular forum is for help with the NetWare
    >> Radius server, which would not factor into what you are trying to
    >> accomplish... you have a non-Novell Radius server that you want to sync
    >> eDirectory information with, and that is the realm of identity manager.
    >>
    >> As to the "hows", you might as in the nsure-identity-manager group here.
    >>
    >> --
    >> Jim
    >> NSC SYsop

Maybe you are looking for