SQL and autoNumber problem!!! Pls help!

Hi everyone!!
I am very new with using SQL language to connect to a database.
In my database, i have a certain table called 'Tourists' and the primary key of this table is TouristID. The data type of the primary key is an autoNumber.
When i use SQL statement like
String strDelete = "DELETE FROM Tourists WHERE TouristID="+touristID;
With this I get an run time error :
****Data type mismatch in criteria expression.****
This is because i save the variable as an Integer..
IS there a way to save me ??? Plss helpp needed! :)
Thanx

Thnks just one question!!
Is the primary key variable in Access an auto number!
What i mean is that is the varibale type in database an auto number!
That is my problem!! The tourist ID is an autonumber in Access!
Below is the erorr!!
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
     at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
     at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
     at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:2525)
     at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:337)
     at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:252)
     at TouristRegistrationGUI.deleteRecord(TouristRegistrationGUI.java:500)
     at TouristRegistrationGUI.buttonClicked(TouristRegistrationGUI.java:217)
     at BreezySwing.GBDialogButtonListener.actionPerformed(GBDialog.java:459)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
     at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1820)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:258)
     at java.awt.Component.processMouseEvent(Component.java:5021)
     at java.awt.Component.processEvent(Component.java:4818)
     at java.awt.Container.processEvent(Container.java:1380)
     at java.awt.Component.dispatchEventImpl(Component.java:3526)
     at java.awt.Container.dispatchEventImpl(Container.java:1437)
     at java.awt.Component.dispatchEvent(Component.java:3367)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
     at java.awt.Container.dispatchEventImpl(Container.java:1423)
     at java.awt.Window.dispatchEventImpl(Window.java:1566)
     at java.awt.Component.dispatchEvent(Component.java:3367)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:134)
     at java.awt.Dialog.show(Dialog.java:524)
     at ExoticToursGUI.buttonClicked(ExoticToursGUI.java:186)
     at BreezySwing.GBFrameButtonListener.actionPerformed(GBFrame.java:518)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
     at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1820)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:258)
     at java.awt.Component.processMouseEvent(Component.java:5021)
     at java.awt.Component.processEvent(Component.java:4818)
     at java.awt.Container.processEvent(Container.java:1380)
     at java.awt.Component.dispatchEventImpl(Component.java:3526)
     at java.awt.Container.dispatchEventImpl(Container.java:1437)
     at java.awt.Component.dispatchEvent(Component.java:3367)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
     at java.awt.Container.dispatchEventImpl(Container.java:1423)
     at java.awt.Window.dispatchEventImpl(Window.java:1566)
     at java.awt.Component.dispatchEvent(Component.java:3367)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

Similar Messages

  • E63 and VOIP problem, pls help

    Hi Guys
    I got Nokia e63 and have successfully configured local VOIP number but it works when I use the " mobile internet" or " my service provider internet " as my default access point not my home wireless connection. 
    When I set my home wireless connection as default access point inside sip settings then I can make calls but cannot receive , I thought my netgear router or firewall causing problem , i configured e71 ( my friend's fone) and it work both ways without any problem.
    when i change the access point to other than home wireless , no issues on e63 , incoming and outgoing work like a charm.
    any known issues ? please advise bcoz its consumin my mobile internet 
    many thanks

    I have a similar problem, I have my E63 for five months now, For first 2 months i was able to make voip calls no problem and was very happy. 
    I was using Mo-Call and Skype. First of all I noticed a degrading of my Mo-Call where I would have to dial several times to get through. then I was unable to connect at all. If I dial a number now I can sometimes hear a dial tone, the phone at the other end rings and picks up. I cant hear them and they cant hear me. annoying thing is that I get billed for the call by my voip service providers.
    I soldiered on with skype which has now downgraded to the point that I can only communicate with instant messaging although it still rings me and I can ring out.
    I have checked and my nokia software is up to date. needless to say I checked with several known good wi-fi points and no luck. I have had friends check thier smart phones on my wi-fi and all had no problems.
    Mo-Call worked hard to try to identify the problem but my account with them works if I try it on other phones.
    I find Nokia Customer Care website difficult to work with. I have been directed to thier local agent here in Dublin (Fonemenders)  whos phone leads to an answering machine. a message was left and they do not respond. 
    Any help greatly appreciated.

  • Urgent: Sessions problem pls help me

    Hi all,
    Its already late to post this problem.pls help me urgently.
    I have a servlet & two jsp's. first i request servlet, it processes something and forwards request to my first jsp. In that jsp on a button click, i'm displaying a new popup by calling showModalDialog. this dialog gets data from the same servlet but it forwards to my second jsp.(second jsp can be seen in dialog)
    Now if i submit form from my second(dialog) jsp, the servlet reports that session has expired. I tried a lot but invain. any one who helps me is appreciated well by all of our forum.
    waiting 4 u r reply,

    It could be that you have cookies turned off and you're not using URL Rewriting.
    In J2EE, the first time your browser makes a request to the server, the server responds and appends a SESSION_ID parameter to the request as well as storing a cookie with the SESSION_ID.
    The second time your browser makes a request, the server checks for the cookie. If it doesn't exist it checks for the parameter. If neither exist the server assumes its the first time your browser has made a request and behaves as describe in the previous paragraph.
    In your case when you submit the form if you have disabled cookies and the action attribute doesn't have the SESSION_ID paramter appended to the url, the browser will assume it's a first request. The user will not be logged in, hence your session has expired error.
    To fix this you need to encode the URL in your JSP. You can use the struts html:rewrite tag or the HttpServletReponse.encodeURL method, or if you're using JSP 2.0 the JSTL c:url tag.

  • Boot problem == pls HELP

    I have use the utility disk and format the machintos drive , and use  Extended (Journaled , Encrypted) , it ask me for a password (typed the password, confirmed the password - done) ,  after that i tried to install a fresh copy of Lion (i waited to be downloded from apple.com - done) after that it said that the fresh copy it will be installed and it will reboot by itself -> done ... from here the problem it's starting .... now my macbook air , it dosent start anymore it keep showming me, instaid of the apple sign from the start , a sign like the one from ghost busters (but without the ghost in it ) , i have tried to boot from cd , from usb , nothing dosent seams to be working.
    If anyone know a solution to this problem, pls HELP! Thank you in advance...
    p.s. before i had 2 hard drives that show up when i press the ALT button (machintos hd and utility drive, or something like that) now.. the only thing that it's showing me is : mac os base system , and if i try to use partition magic or something else, from a usb, it will tell me something about a bootguard , but i don't know how to insert the password.

    Glad your issue is fixed. Thanks for the update!
    Click if you want to Thank someone. If Problem is resolved, so that others can make use of it.

  • How to solve this problem, pls help when I try to see remote camera system from home."Dual streaming is required for HTML viewing"

    How to solve this problem, pls help when, I try to see remote camera system(spec dvr) from home. The Error I get is "Dual streaming is required for HTML viewing"

    I had the same probelm and found that the problem lies with 64bit programs such as safari and microsoft internet explorer. I have resolved the issue on my PC based server by using a 32 bit ie and same on my mac by using the same running windows under parallels.
    So far the problem with the 64 bit side of it is still to be resolved.
    Hope this helps and gets you guys up and running until suchtime a 64 bit solution is found.
    Craig

  • How do I delete my old iMessage email and change to my current one, that Im using when I buy apps and so on. The old one wont go away when I turn iMessage on and of again. pls help

    How do I delete my old iMessage email and change to my current one, that Im using when I buy apps and so on. The old one wont go away when I turn iMessage on and of again. pls help
    Anyone had the same?

    How do I delete my old iMessage email and change to my current one, that Im using when I buy apps and so on. The old one wont go away when I turn iMessage on and of again. pls help
    Anyone had the same?

  • SQL server weird connection problem-Pls help

    I m using SQL server 2005 express. My default logon mode setting is set to-SQL server authentication and I can logon to using SQL server management studio express always. I enabled TCP/IP from SQL server configuration manager. The sqljdbc.jar (JDBC driver) is set correctly in classpath and 1433 port is allowed in windows firewall. YET, I can�t connect to sql server using the following code-
    import java.sql.*; public class testconn { Statement stmt; Connection con = null;       String driver = "jdbc:sqlserver://"; String server = "localhost:1433;"; String db = "database=IDLC-Customer;"; String user = "userName=Tanvir;"; String pwd = "password=abcd;"; String connectName = driver + server + db + user + pwd;    testconn() { try {       Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");       con= DriverManager.getConnection(connectName);       stmt=con.createStatement();       if(!con.isClosed())         System.out.println("Successfully connected to " +           "SQL server using TCP/IP...");     } catch(Exception e) {       System.err.println("Exception: " + e);    }     finally {    try {         if(con != null)           con.close();         } catch(SQLException e) {}    }        }   public static void main(String args[]) {       testconn tc=new testconn();   } }
    My host name is- Tanvir. So, in management studio express the server name is shown- TANVIR\SQLEXPRESS
    When I run the code it says-The TCP/IP connection to the host has failed.
    Java.net.connectException:Connection Refused: Connect
    One more thing, though 1433 port is allowed in windows firewall, I can�t connect to that port using telnet (e.g. telnet <server_host> 1433).I even disabled firewall and tried but in vain. PLEASE help me brother.

    masijade. wrote:
    Then you, seemingly, have not configured your SQL server properly, or you have not "activated" that configuration.
    (don't ask because I don't know how, or even if, you do it that way with SQL Server).
    But, not being able to connect with telnet, means that nothing is listening on that port. What does the netstat command tell you?Brother,as u know that sql server use the default port 1433 even if i don't mention it.And I tried disabling my firewall and antivirus but yet I cant connect.I searched the ports using "Advanced port scanner" but the port 1433 is neither in its open ports list nor in closed port list. WHat can I do now.The port 1433 is by default used by sql server.So even if I dont mention it or set it, it should work.Isn't it? I m getting out of my mind, pls help .

  • SQL query...pls help ASAP

    Actor (Aname: varchar(40), Ano: varchar(6)) Ano is pk
    Movie (Mname: varchar(40),mno: varchar(8)) Mno is pk
    PlayIn (Ano, Mno, Pay: Integer) Ano and Mno are fk referencing Acotr and Movie respectively.
    Actor(Aname, Ano)
    A Bingo, A1
    B Castro, A2
    C Katie, A3
    S Hommy, A4
    J Tammy, A5
    K loren, A6
    Movie(Mname, Mno)
    Gladiator, M1
    Cast, M2
    Dog, M3
    Jilters, M4
    PlayIn(Ano,Mno,Pay)
    A1 M1 800
    A1 M2 1500
    A2 M2 78
    A2 M3 1750
    A2 M4 2301
    A3 M2 904
    A3 M3 629
    A4 M2 565
    A4 M3 5695
    A4 M4 1255
    A5 M1 989
    A5 M4 238
    A6 M2 137
    A6 M3 236
    A6 M4 545
    QUESTION: write SQL query to find the names of actors who earned less than 'B Castro' in each movie that 'B Castro' played in.

    thanks so so much.....
    another question:
    for each movie, list the movie number, the average
    pay and the total number of actors in the movie.....Rather than just asking homework questions and expecting everyone else to do your work for you, why don't you at least have a go at it yourself and post the query that you've tried, then we'll tell you where you are going wrong. You won't learn anything if we just write it for you.
    Also, your use of "pls help ASAP" in the subject title is not polite.
    This forum is manned by volunteers who have their own jobs and offer their help free of charge.
    Everyone who posts an issue on here would love to have it answered as soon as possible, but nobody has the right to assume that their issue is any more important, urgent or requires a quicker answer than anybody elses.
    If you need urgent help then you should pay someone to do the work for you.

  • Import problem,pls help!

    Hi,there,
    I'm new guy here,I'v got a problem about Import in table mode,I found I can import back all records successfully, but it just appends all records into the orignal table,not overwrite
    it,for example, I made a export for a table with 2 records, after then I added some records into that table,
    finally I made an import for that table, I found the
    total of records is not recovered to 2,but just append
    the records from export file,why can't I recover it to 2
    record? pls help me,thanks!

    All that import does is to run a bunch of SQL statements based on the content of the export file. If you look at the export file in an editor (if its small), or through type (on Windoze) or more on *NIX you will see stuff like:
    CREATE TABLE x STORAGE ( ...)
    INSERT INTO x col12,col2, ...
    VALUES (:b1,:b2, ...
    If you give imp the paramter ignore=Y, then the error generated by the CREATE TABLE (table already exists) will be suppressed, but the ata will be inserted. Note that there are no DROP TABLE or TRUNCATE TABLE commands in the export file.
    If you want to restore your database to a particular point in time using import, then you will need to manually drop or truncate the tables first. You can generate the required sql from the data dictionary. something like
    SET lines 1000 pages 0 feedback off trimspool on;
    SPOOL drop.sql;
    SELECT 'DROP TABLE '||table_name||';'
    FROM user_tables;
    SPOOL OFF;
    @drop.sqlHTH
    John

  • Weird Problem pls help.

    Hi guys I have a big problem that I can't figure out. See I have a PT880 Neo and on the mobo box it says it's VIA. But when I go to install the Hyperion 4 in 1 mobo drivers my system crashes. When I boot up I get a Bsod stating my graphics card is in an infinite loop and says the video driver for my card is the problem. Also when I go to install new hardware it doesn't detect it. I checked the bios and pnp is enabled. So I put a new network card in and it will only detect it in the top pci slot so is this some kind of glitch am I downloaded the right drivers? The hyperion 4 in 1's version 455vp1 pls help

    I need your full system specs + PSU specs.
    Read these guides as well >Moan Guide Power Supply Guide

  • Upgradation problem pls help

    I imported my oracle 8.1.5 database dump in oracle 8.1.7 but when I want to connect to my instance thru a client machine one error message comes as "
    problem in connecting to the database, check whether it is started or contact sys admin" whereas the database is in open state.
    Then when I connected to sqlplus at the server, it gets connected but some messages also come as below"
    ORA-06553: PLS-213: package STANDARD not accessible
    Error accessing package DBMS_APPLICATION_INFO
    ERROR:
    ORA-06553: PLS-213: package STANDARD not accessible
    Could anyone pls help..

    What is the result of
    SQL> show parameter PLSQL_V2_COMPATIBILITY
    ?

  • Serious problem. pls help !!!!!!!!!

    some "khar, khar sound is coming from below of the keyboard of my hp g6 pavillion 2231 all the time when the lapton is on. what to do. i am fed off of that noise. pls help!!!!!!!!
    This question was solved.
    View Solution.

    Hi 
         Sorry khar khar ????   Mainly any sounds from under the keyboard would be Fan or HDD either way could mean either the Fan ( if fan ) is struggling to move due to dust build up OR the hard drive is failing  ,,, It's difficult to give you a firm answer without more information . Can you tell the difference between the fan noise and a hard drive noise ?? When you start up from cold does the noise start immedietly or is it only heard after say 5-10 minutes ??????           Checkurtech
    ****Click the White Kudos star to say thanks****
    ****Please mark Accept As Solution if it solves your problem****

  • Installation problem, pls help

    I am trying to install Oracle 10g on SUSE 10.0.0 but when i run the ./runInstaller command, I receive an[b] error of writting to directory /tmp/OraInstall2006-03........, Please ensure this directory is writable and at least 60MB of disk space, i have checked for space using df -h /tmp, there is enough space, i think the problem has got to do with permission because @ the moment it belongs to root user, i don't know what to do, i am a novice to unix and need to install oracle today. Pls help
    Usually the standard install of SuSE Linux should set the ownership and access rights to /tmp, if you want to give access to everyone on the system, just use this command (if owner/root access is available):
    I have used chmod o+rwx /tmp command and still having the same error. Pls somebody help
    chmod o+rwx /tmp

    Of course I assume you did correctly follow installation and configuration instructions. Did you read Oracle10g/Linux Errors and Problems from Werner Puschitz ?

  • Audio+Video Chat works but one small problem.Pls help.

    HI..
    as i had posted once before in a different query's thread, i have implemented audio and video chat using AVTRansmit2 and avreceive2.
    audio and video chat work well.By video chat i mean not only video but VIDEO+AUDIO as well.. just like usual yahoo video chat.
    But the problem is like this:-=
    I have given an option for user to switch from audio chat to video chat.
    now if a user first goes to audio chat and then switched to video chat,
    then the problem comes. When he's shifted to video chat i close down previous Audio chat by RTPManager.dispose() , i close the player and everything..
    and then i start Video transmit/receive "ALONG WITH" audio transmit/receive..
    No this time video starts but audio doesnt work ..
    it says"waiting for rtp data to arrive.... "
    The problem is that when this new stream of audio data comes, the receiver somehow thinks that its the same old stream since its from same transmitter IP.. and so it tries to UPDATE the previous stream.
    It means there is some problem with the close method or RTPManager.dispose() which should have disposed off all the stuff much before the new connection was made.
    PLS HELP ASAP>
    this is crunch time for my project.

    Hi anandreyvk . .
    well, i had tried doing removetargets and also, i had disposed RTPManager well. As it turns out the problem was not with any of it but it was the problem of me incorrectly passing RTPManager from AVReceive2 to AVTransmit2.
    Actually i am using just one RTPManager.. since i am receiving and transmitting on the same port.
    i've solved the problem but i am not sure if this is the right way .. what do you think ??
    is creating just one RTPManager {by that,i mean initializing it only once} a good idea ?? Since we are supposed to call both AVTransmit2 and AVReceive2 with the "LOCAL PORT" .. {which in itself is a matter of discussion though! } i and my project mate thought initializing RTPManager only once is a better option .
    Whats your take on all of this ?

  • I forgot my icloud email and my password pls help me ineed my phone fix

    i forgot my icloud email and password what can i do ? pls help me

    Welcome to the Apple community.
    Unfortunately, you cannot do very much with your phone unless you get assistance from the previous owner, they should either provide you with the password to unlock it or remove their account from the phone entirely remotely through iCloud.com > Find My Phone.

Maybe you are looking for

  • Time Capsule files

    I have just two items on my Time Capsule. A vault of photos from Aperture and a backup of my hard disk. The hd backup is scheduled to update automatically every few hours and, according to the motion of the icon on my desktop, it does so. My photo va

  • Why have my tiff files on my external hard drive been converted to CR2 files?

    I've been using Lightroom 3 with an external hard drive for a few years now with no problems. I shoot raw with my Canon t1i and jpg with my Canon SX-10. Just last week I hooked up my external hard drive and Lightroom wouldn't connect to it. Usually w

  • Doubt with generation of code WD ABAP Using Wizard

    Dear Experts. I am reading documentation, Wikis, etc for WD ABAP. Web Dynpro for ABAP: Tutorials for Beginners [original link is broken] However my doubt is in this moment when I am generating the code using the Wizard. For example: In this moment I

  • Set rlim_fd_cur=8192 for Solaris 10 Zone?

    Hi! I would like to install SAP Solution Manager 7.0 on Solaris 10 Zone (Sparc 64 Bit). Unfortunately I could find the file etc/system. Instead I added the project file acording to SAP note 724713. When I run SAP prerequisite Checker SAPINST tells me

  • Mountain Lion Server - Folder names intermittently change between Upper and Lowercase names on some user's iMacs

    Hi, Sorry if I'm posting in the wrong group, but I couldn't find a Mountain Lion server specific group. I have a new Mac Mini Server running 10.5.8 that serves Mac only users. The Mac Mini has a 4tb Promise Pegasus RAID attached via thunderbolt. Toda