Java with EXCEL and Access

I have a program that imports an EXCEL file as an Access database.
One field in the EXCEL file contains ZIP codes which, when imported into the database are stored as numbers/double. I would , however, like to import these as char. Any way I could do this using a code?

I am using the resultset and the metadata functions to get the column type. I use the getString(6) function in the resultset..which returns the data type..
When the zips are arranged in random order..this retuens the column type as NUMBER which messes up the program...however if I arrange the column in the descending order...it returns VARCHAR and the program runs perfectly...How can I get it to return NUMBER even if the contents of the column are arranged randomly?

Similar Messages

  • Office 2010 & 2007 - Excel and Access File Locking Out On the Network With Multiple Users

    This is also posted in the Office 2010 - IT Pro General Discussions, but was suggested to repost here, since a definitive answer was not found.
    Hi,
    An issue that's happening is that Excel and Access files are locking on the network. We're currently using Office 2007 and 2010.
    Here are some different scenarios that are happening:
    When opening the file it is locked out by “User X” which is the person that has the file locked out and no one else can open the file.
    When opening the file it is locked out by “User Y” which is NOT the actual person, but is locked out by “User X” and no one else can access the file.
    When opening the file  it is locked out by “…another user” which is generic and no one else can access the file.
    The two more common events are incident 1 and 2 with 3 happening the less common.
    This message will continue until the sessions are closed through computer management on the file server.
    The file server is running Windows Server 2003.
    This does happen on both Windows XP and Windows 7 clients.
    This does happen for users using Office 2007 and Office 2010.
    There are two sets of Office 2010 Users when it comes to patches. Everyone has the most current patches with Office 2010 SP2 while anyone that has Microsoft Project 2010 is using all the current update before Office 2010 SP2.
    All users that are using Office 2007 have all the current patches and service packs.
    Another variable is that we have users that will leave a file open on the network for 3+ days and after a while it will lock the file out.
    Also we have Shadow Copy that runs daily on the system which I'm not for sure if that impacts anything if a file is opening during that time.
    Any ideas on how to mitigate the lock out issues would be appreciated.
    Thanks,
    Binary Process
    Edit November 12, 2013: This issue can occur if and if not another person actually has the file open. If the person doesn't have the file open then there is a hung connection which needs to be disconnected by going to the Computer Management of the File
    server.

    Hi Binary,
    I know that the description of the hotfix does not relate to the issue. The purpose is to install it for upgrading SMB related file.
    A similar issue I encountered before:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/b7fcc59b-52d9-4a02-863a-1a529bcb8cb1/temp-doc-etc-files-dont-close-after-a-file-closes-this-causes-locked-files?forum=winserverfiles
    It is resolved by upgrading SMB files so maybe it will help on your case.
    Another hotfix which may related:
    http://support.microsoft.com/kb/983458
    If you have any feedback on our support, please send to [email protected]

  • Uk date format issue with ASP and Access Database

    I have an Asp form which updates records in an Access
    database. Problem is
    that the date format in the database record is dd/mm/yyyy
    (UK), when
    the record is displayed on the form it is mm/dd/yyyy(US)
    which after I
    update the record in the database the date has changed to the
    new format.
    I have tried everything I can to change the format but to no
    avail...anyone any ideas how I can resolve this issue?
    Thanks
    Steve

    stevo.s wrote:
    > Hi
    >
    > I have tried changing the format on the date field on
    the server behaviours
    > panelto ddmmyyy. Also have tried to set the form field
    format to ddmmyy. I have
    > also tried to use a function I got from a posting
    somehwere on the net to no
    > avail. <%function ddmmyyyy(varDate)
    > ddmmyyyy = Day(DateValue(varDate)) & "/" &
    Month(DateValue(varDate))
    > & "/" & Year(DateValue(varDate))
    > end function
    >
    > I believe that this is a recognised issue with
    Dreamweaver and Access but
    > can't seem to grasp the work around! Problem being I am
    teaching myself through
    > books and internet articles and can be weeks at a time
    without being able to
    > look at the issue..each time I come back to it it is
    like starting all over
    > again! I was hoping that somewhere out there there is a
    simple solution the
    > issue perhaps a date picker with the built in
    functionality to address the
    > issue...I am keen to understand how to deal with the
    issue rather than just
    > change my database date field to fudge the problem as I
    am in the UK and when I
    > eventually start to use the application I would like
    there to be some
    > consistency with dates and that users are familiar with
    the format.
    >
    > Any help gratefully received!
    Its not Dreamweaver, or Access, its your servers locale, its
    set to US
    format, not the UK.
    On your page at the top use:
    <% Session.LCID = 2057 %>
    This will force the page into using UK formatted dates. Use
    it on any
    page that needs to format the page correctly.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • Why does my lion starts up with excel and entourage? how do I turn this off without cousing trouble to my software or the start up of my macbookPro?

    I have a problem starting up my new lion version for my macbookpro, it is starting up with entourage and excel? How do I solve this?
    Thanx
    JMW

    By default, your system will automatically restart with all of the same applications open that were open when you shut it down.  When you tell your system to shut down or restart, you will get a dialog box like below.  You need to uncheck the box.  Note that your election here will not be permanent... you will need to select it each time you shutdown (or just close all of your applications before you shutdown).

  • Working with EXCEL and WORD files on a Mac Pro

    Hello,
    I have a lot of EXCEL and WORD files and the compatibility with NUMBERS and PAGES is not really satisfying. Is there a EXCEL and WORD app which runs without surprises on a Mac Pro?

    Welcome to Apple Support Communities
    Microsoft sells its own Microsoft Office version for OS X > http://www.microsoft.com/mac Microsoft Office for Mac will be the application that will give you less headaches when using Office documents, so I recommend it.
    Another application you should consider is LibreOffice, which is free > http://www.libreoffice.org

  • Issue with Excel Web Access --Excel graph showing only gray color

    I am using "Excel Web Access" Web Parts to show the excel graphs in my MOSS2007 setup. I have multiple team sites under one site-collection. Excel web access is fine for all the team sites but , its showing only gray color for just one site. I tried to upload
    new excel sheet with different graphs but still it shows the same gray color.
    Any help would be really appreciated. 
    Umesh Mishra | My blogs: http://windowsadminblog.blogspot.com | Twitter @UmeshMishra | Linkedin: /in/umeshmishra

    I was able to resolve the issue , here is the solution: http://windowsadminblog.blogspot.in/2012/12/excel-web-access-graphs-showing-gray.html
    Umesh Mishra | My blogs: http://windowsadminblog.blogspot.com | Twitter @UmeshMishra | Linkedin: /in/umeshmishra

  • Question regd C++ and Java with Tomcat and SSL

    I have configured Tomcat with SSL and am running a servlet
    which is going to recieve input from a C++ Application.
    The team which are coding in C++ have a statement in their C++
    code 'HTTP1.1'
    My Tomcat is v 3.2.4
    Does this support HTTP 1.1 OR HTTP 1.0 PROTOCOL.??

    tomact latest version supports both HTTP specifications 1.1 and 1.0. If you want to make sure you for tomcat 3.2.4 then you can search the web and jakarta website for this.
    Regards
    Akhil Nagpal

  • Java for work on Excel and Access

    I have a program that imports an EXCEL file as an Access database.
    One field in the EXCEL file contains ZIP codes which, when imported into the database are stored as numbers/double. I would , however, like to import these as char. Any way I could do this using a code?

    I am using the resultset and the metadata functions
    to get the column type. I use the getString(6)
    function in the resultset..which returns the data
    type..
    When the zips are arranged in random order..this
    retuens the column type as NUMBER which messes up the
    program...however if I arrange the column in the
    descending order...it returns VARCHAR and the program
    runs perfectly...How can I get it to return NUMBER
    even if the contents of the column are arranged
    randomly?You can't.
    This is an Excel problem exclusively and if you want more help with it then you should post that part of your question on an Excel specific forum and not here.

  • JDBC with Excel / MS-Access

    I wish to connect from Java to a table in Excell or MS-Access and don't have a clue on "how to?".
    I'm working with J2SE 1.5.0_01 and BlueJ IDE.
    I get an error on "import sun.jdbc.*;":
    "package sun.jdbc does not exist".
    I've check my computer and couldn't find it.
    Q1: where can I get JDBC drivers?
    Q2: Are there any Freeware JDBC drivers?
    Q3: Where can I download them from?
    This is the code I'm trying to compile and get an error:
    import java.sql.*;
    import javax.sql.*;
    import sun.jdbc.*; // <--- I get the error on this line ******
    * This Class is a demo for using JDBC-ODBC: Connecting to Excel file and MS-Access Northwind sample DB.
    * @author Benny Regev e-Mail: [email protected]
    * @version 1.0.00.0000 (Version Numbering: Major.Manor.Patch.Build)
    public class UsingJDBCDemo {
    * Constructor for objects of class UsingJDBCDemo
    public UsingJDBCDemo() {
    // initialise instance variables
    x = 0;
    * Connect to the Database using JDBC:ODBC driver
    * @param y < N O N E >
    * @return int. 1 if successful, 0 if nothing done, or an error code.
    public int connectToDB() {
    // Load the JDBC-ODBC bridge driver
    Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) ;
    return 0;
    I appreciate any help.
    Thank You,
    Benny Regev
    e-Mail: [email protected]

    I wish to connect from Java to a table in Excell or
    MS-Access and don't have a clue on "how to?".Start here:
    http://java.sun.com/docs/books/tutorial/jdbc/
    >
    I'm working with J2SE 1.5.0_01 and BlueJ IDE.Lose the BlueJ IDE until you know what you're doing. Better to compile and run on the command line.
    I get an error on "import sun.jdbc.*;":
    "package sun.jdbc does not exist".Right, because there is no such package. Besides, you should never import that package (or any other JDBC driver package, for that matter). All you need is the java.sql package.
    I've check my computer and couldn't find it.Because there is no such thing.
    The bridge driver class that you want is sun.jdbc.odbc.JdbcOdbcDriver.
    >
    Q1: where can I get JDBC drivers? You just need the bridge.
    Q2: Are there any Freeware JDBC drivers?Most database vendors provide JDBC drivers for their products, but Access isn't one of them.
    Q3: Where can I download them from?You can't for Access, but all other database vendors have drivers for their products.
    This is the code I'm trying to compile and get an
    error:
    import java.sql.*;
    import javax.sql.*;
    import sun.jdbc.*; // <--- I get the error on thisThere is no such package, and you should not be importing it. You don't need javax.sql, either.
    Learn how to use code tags, Benny. This code is pretty awful, and won't do what you want.
    public class UsingJDBCDemo
        public UsingJDBCDemo()
            // initialise instance variables
            x = 0;  // I don't see any instance variables declared.  This local variable will be out of scope the moment you leave the ctor.  It's not declared properly, either.  What's the type?
         public int connectToDB()
             // Load the JDBC-ODBC bridge driver
             // Here's a useless method.
             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
             return 0;
    }Study that tutorial. You're not off to a good start.
    %

  • Problems with Excel and Word 2013 saving to OneDrive for Business

    I've had OneDrive for Business running for about a month without any problems. On Thursday I noticed I wasn't able to save an Excel 2013 spreadsheet to my OneDrive account. When I try to save it a box comes up that it's communicating with OneDrive then I
    get an error that the file wasn't able to upload due to permissions. I've tried to resync and repair OneDrive, but that didn't help. I also repaired Office 2013.
    If I create a txt file in Notepad I can save immediately to the same folder on OneDrive. If I create a new spreadsheet and hit the browse button to save it takes forever for OneDrive to access the folder then I get an upload error saying it cannot save and
    to make a copy.
    Should I re-install Office 2013?

    Hi,
    Are you able to new a Word/Excel file directly in that OneDrive folder?
    Please first try to remove and re-add the OneDrive service in Office and then verify result.
    You might also want to install any available updates, make sure your system/Office is up to date and then try again.
    Regards,
    Ethan Hua
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Problems with classpath and accessing a specific file

    I'm currently running an application using NetBeans (I know this is the Sun Forum but maybe someone can help). For those who aren't familiar with this IDE, whenever a project is created, a ProjectName folder is also created. Inside that folder are 5 new folders (*build*, dist, nbproject, src and test) as well as 2 new files (*build.xml*, manifest.mf). The dist folder contains the *.jar* file.
    Seeing that this is an audio application, I am constantly working with audio files. In the ProjectName folder, I've created a sixth folder (*audiofiles*) were I load and save such audio files. To access a specific audio file, I do the following:
    File audioExample = File("audiofiles" + File.separator + "audio.wav");When I run the project from the IDE there doesn't seem to be a problem. However, when I try to run the project by simply double-clicking the *.jar* file in the dist folder, the audio files can't be accessed. In order to be able to access them, I need to change the path:
    File audioExample = File("C:\...\ProjectName\audiofiles\audio.wav");This seems to solve the problem temporarily, but if I decide to change to project folder location, I also need to change the path.
    QUESTION:
    What is the best way to access files so that they are not dependent on where the project folder is located? Do I need to modify the classpath or simply write the path in File(...) in a specific way? If I need to modify the classpath, how can I do so in Netbeans?
    Thanks in advance.

    DrClap,
    Thanks for the reply. To answer your questions:
    Naturally that depends on where you DO want to load from. Are the files in the classpath? Are they in the current working directory?
    Some other directory where you can ask the user to point to? On a different computer?The audio files are located in a created folder in the IDE project folder. I know you mentioned that I should stop thinking about this as an IDE project but I don't know any other way to think about it. I'm kinda new to Java, and the only way I've learned how everything is structured is through the IDE project structure. I'm realizing that this is probably not the best way to go about as it doesn't allow me to have a good understanding of the Java file structure. What changes do I need to make in the way I view my IDE project to make it more into a deployed version?
    I'm also having a hard time understanding the classpath concept. I've been under the impression that the classpath was simply the location of the packages and classes of a specific application. How could I check if the audio files are in the classpath?
    Thanks in advance.

  • Connect Java with SSRS URL Access method

    I am trying to connect SSRS with Java to display the reports in a browser.
    My application is java 1.6 Swing application and use Applet.I read the article
    http://www.javaworld.com/javaworld/jw-01-2005/jw-0110-sqlrs.html?page=4
    But I am not able to understand why do we need the servlets the authors has mentioned.
    I am able to connect and get back the report in pdf format without these servlets .Also what sort of access will be required for this.
    Will all external users need access to the report server.
    Some one please help
    Any other suggestion for connection SSRS with JAVA .I have tried webservice method and it dint work either now I am planning for url access
    but need help with this
    Thanks

    Can anyone please help.I can provide any more info if needed.I tried the URL method but I get no response in my stream.
    I can post the code i am using in the servlet.

  • ASA5505 Upgrade to 9.1.5 from 8.4.1 - problem with nat and accessing external host

    When running on 8.4 i had a working config with the following scenario.
    I have 2 interfaces configured as the outside interface.
    One is connected to my internet connection
    The other one is connected to a host that has a public ip.
    The public host can access internet and also a PAT port on an internal host.
    But after the upgrade the internal hosts can't access the external host but everything else on internet 
    packet-tracer input inside tcp 10.x.x.11 1024 x.x.x.89 22
    Phase: 1
    Type: ACCESS-LIST
    Subtype: 
    Result: ALLOW
    Config:
    Implicit Rule
    Additional Information:
    MAC Access list
    Phase: 2
    Type: ROUTE-LOOKUP
    Subtype: input
    Result: ALLOW
    Config:
    Additional Information:
    in   x.x.x.0    255.255.240.0   outside
    Result:
    input-interface: inside
    input-status: up
    input-line-status: up
    output-interface: outside
    output-status: up
    output-line-status: up
    Action: drop  
    Drop-reason: (nat-no-xlate-to-pat-pool) Connection to PAT address without pre-existing xlate
    If i add 1 to the destination ip:
    packet-tracer input inside tcp 10.x.x.11 1024 x.x.x.90 22
    Phase: 1
    Type: ROUTE-LOOKUP
    Subtype: input
    Result: ALLOW
    Config:
    Additional Information:
    in   x.x.x.0    255.255.240.0   outside
    Phase: 2
    Type: ACCESS-LIST
    Subtype: log
    Result: ALLOW
    Config:
    access-group inside_access_in in interface inside
    access-list inside_access_in extended permit ip any4 any4 
    Additional Information:
    Phase: 3
    Type: NAT
    Subtype: 
    Result: ALLOW
    Config:
    nat (inside,outside) source dynamic any interface
    Additional Information:
    Dynamic translate 10.x.x.11/1024 to x.x.x.80/1024
    Phase: 4
    Type: NAT
    Subtype: per-session
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 5
    Type: IP-OPTIONS
    Subtype: 
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 6
    Type: NAT
    Subtype: rpf-check
    Result: ALLOW
    Config:
    nat (inside,outside) source dynamic any interface
    Additional Information:
    Phase: 7      
    Type: USER-STATISTICS
    Subtype: user-statistics
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 8
    Type: NAT
    Subtype: per-session
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 9
    Type: IP-OPTIONS
    Subtype: 
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 10
    Type: USER-STATISTICS
    Subtype: user-statistics
    Result: ALLOW 
    Config:
    Additional Information:
    Phase: 11
    Type: FLOW-CREATION
    Subtype: 
    Result: ALLOW
    Config:
    Additional Information:
    New flow created with id 98586, packet dispatched to next module
    Result:
    input-interface: inside
    input-status: up
    input-line-status: up
    output-interface: outside
    output-status: up
    output-line-status: up
    Action: allow
    Nat rules:
    nat (inside,outside) source static IPv6_HOST interface service https https
    nat (inside,outside) source static IPv6_HOST interface service http http
    nat (inside,outside) source static IPv6_HOST interface service ssh ssh
    nat (inside,outside) source static INTERNAL interface destination static EXTERNAL EXTERNAL service apcupsd apcupsd
    nat (inside,outside) source static IPv6_HOST interface destination static IPv6_POP IPv6_POP
    nat (inside,outside) source dynamic any interface
    The EXTERNAL is the host that is connected to an outside interface and that NAT rule works ok.
    I can ping the EXTERNAL host from the ASA but not from the internal network.
    Any ideas would be appreciated.

    Hmmm, by adding the following i got it working:
    nat (inside,outside) source static IPv6_HOST interface service https https
    nat (inside,outside) source static IPv6_HOST interface service http http
    nat (inside,outside) source static IPv6_HOST interface service ssh ssh
    nat (inside,outside) source static INTERNAL interface destination static EXTERNAL EXTERNAL service apcupsd apcupsd
    nat (inside,outside) source static IPv6_HOST interface destination static IPv6_POP IPv6_POP
    nat (inside,outside) source dynamic inside interface destination static EXTERNAL EXTERNAL
    nat (inside,outside) source dynamic any interface
    It is a bit complicated though since the EXTERNAL host get it's address via DHCP and so does the ASA.

  • Problem with applications and accessing database

    Hi
    I have a serious problem with my applications.I was trying to change "users"'s folder icon so I changed the setting in information.I don'y know what I did but It made these problems:
    many of applications does not open for example
    itunes-->The folder "iTunes" is on a locked disk or you do not have permission...
    picasa alerts me with a database error
    yahoo messenger just pops up once and doesn't open.
    firefox the same problem
    net monitor alerts with a database problem.
    evernote same problem
    all of my address book is erased.
    I think somehow I removed the db files or I changed the permission and the programs can not access to their db files.

    don't know the last thing I have done was trying to change the icon and after that I found out about the problem.Maybe sth else caused the problem . anyway I copied all of my files to a new user and I removed the user with problems & everything is ok here.thank u all.

  • I need some help with MIDI and accessing samples

    I recently purchased Logic Express 9. I'm really happy with it--it's certainly a step up from Garageband--but I'm having trouble connecting my MIDI keyboard. In Garageband, I was able to just plug the keyboard in using a MIDI/USB cable and play software instruments immediately. But in Logic, when I connect the keyboard (a Yamaha PSR-273) into a USB port, it doesn't even register! Right now, the only way for me to play software instruments is through the Capslock keyboard, and I would prefer to play on real keys. How can I connect my keyboard so I can play Logic software instruments?
    Also, I read on the Apple website for Logic Express that there are "More than 1000" sampled EXS instruments, including "strings, horns, woodwinds, guitars..." etc. The only EXS instruments that I've been able to find are synthesizers. Where are the other EXS instruments and how can I access and use them?

    Make sure that the keyboard is turned on before you launch Logic.
    In the system preferences of the computer is it connected?
    In the preferences of Logic, does it give you an option in the audio section to use the driver in your keyboard? That should come up if its connected

Maybe you are looking for

  • Can we have a Windows 7 option in the My Settings OS list, please?

    Can we have a Windows 7 option in the operatings systems list in "My Settings" please? Not having it there tends to add to the impressions among posters that some Apple software (that is supported on Windows 7) isn't supported on Windows 7, or that A

  • Goods Receipt indicator  in PO ( SRM 7.0 )

    Hi Experts, Where is going Goods Receipt indicator (Goods Receipt / Confirmation of Performance of Service) in PO item from? from Vendor master-data or it depends on the Account Assignment Category? Thank you.

  • ORA-30653: reject limit reached

    Hello All, Today we have encountered the following errors in our alert log file ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEFETCH callout ORA-30653: reject limit reached when we checked the log in detail we got this t

  • The Iphone available in france on appel store?

    Hello, (I'm sorry, I don't speak english very well, because I'm french) According Appel, the Iphone would only be available in France on November 29. But visiting the site, we saw the french could buy from this page: http://store.apple.com/Apple/WebO

  • Use of variables from other class

    hallo, i have two classes A and B i would like to access a variable of the class B out of A class without class A extends B or A classA = new A(); to use i attempted it with a constructor class A{     B klb;     public A(B b1){     this.klb = b1;