Help needed. Access Driver Error

This is basically my code:
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String sourceURL = "jdbc:odbc:my_Library";
Connection databaseConnection = DriverManager.getConnection(sourceURL);
     if(authorNames.getInt("Available") == 0)
          {     // Do this when book is currently on loan          
               Statement SQLstatement = databaseConnection.createStatement();
               String changeLastName = "UPDATE tblAvailable_Items SET Reserved_by = ? WHERE Item_ID = ?";
               PreparedStatement updateLastName = databaseConnection.prepareStatement(changeLastName);
               updateLastName.setString(1,"Nigel");
               updateLastName.setLong(2,9);
               updateLastName.executeUpdate();
When I run this in my browser I get the following error:
"java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97 Driver]Driver not capable "
Any ideas why this won't work?

Hi wrote for luck!
I am starting to learn how to manipulate access database using JDBC.
I am reading a book but it uses Informix as its database. Can you send me a sample program using an Access 2000 database in JDBC? My email is [email protected]
Thanks in advance!
Cheers,
Moses

Similar Messages

  • Help with [Microsoft][ODBC Microsoft Access Driver]Error in row

    hi all,
    it seems i have the same problem updating a field in access database here is what my access table has:
    a field called userID of type String in Access 2000 on XP.
    i wrote the following code in java using Eclipse 3.1.1 ( latest) to update that field:
    String database= "jdbc:odbc:Driver={Microsoft Access Driver(*.mdb)};DBQ=";
    String url= database + filename.trim() + ";DriverID=22;READONLY=true}";
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con= DriverManager.getConnection( url,"","");
    con.setAutoCommit(false);
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    stmt.executeQuery("SELECT Users.* FROM Users");
    ResultSet rs = stmt.getResultSet();
    rs.moveToInsertRow();
    rs.updateInt(1,"test");
    rs.updateRow();
    con.commit();
    rs.close();
    stmt.close()
    con.close();
    i get this error :[Microsoft][ODBC Driver Manager] Invalid cursor state
    if i use the same code with using re.next(); before rs.moveToInsertRow(); i get [Microsoft][ODBC Microsoft Access Driver]Error in row
    i get the errors right at : rs.updateRow();
    i dont know what exactly the problem is. why doesnt it get updated and complain about it.
    plz help

    I'm not sure which JDBC driver you are using.
    An access database, by default, has a username and
    password as "admin" and "" (ie, empty password).
    Actually MS Access has two methods for security. You
    are referring to one of them.
    If the password of admin is changed, you have to
    provide the name of the workgroup information file
    also( where it is stored) for making a connection.
    I am not sure about the ODBC bridge driver. What iam
    using is Atinav's aveConnet JDBC driver. It has
    provision for giving username and passwords through
    Workgroup information file. In addition to it youcan
    give the database password also.
    Interesting to note. The bridge for MS Access does
    not use that security method. And it will fail if you
    set up security using the groups/users adminstration.
    The only method it allows is via the "database
    password" method.Thank you for your response, but what User ID should I use when I use database password?
    openConnection(URL,"xxxx","database password")
    thanks again
    David Ling

  • PSE 5.0 - ODBC Microsoft Access Driver error

    I've been using PSE 5.0 for several years now without major difficulties -- until I burned a CD of personal photos downloaded onto my laptop, and then downloaded them to my desktop.  Ever since then, whenever attempting to edit or delete a photo on my desktop, I get the following error message:
    The OBDC data source reported the following error:  "[Microsoft][ODBC Microsoft Access Driver] Invalid argument."
    Also, hundreds of my Organizer photos simultanously became disconnected when this error message began.
    I've tried several fixes, incl. uninstalling PSE 5.0 and then reinstalling it.  No luck.  I'm hardly a computer expert and am clueless about what could have happened, and what I need to do next.  Help, please!
    PSE 5.0 continues to work perfectly on my laptop, btw.

    Can't help, but you may search for Microsoft error message help at
    http://search.microsoft.com/search.aspx?mkt=en-US&setlang=en-US

  • ODBC Microsoft Access Driver Error

    Help! I'm a novice. I have PSE3.0 installed on my laptop (HP Pavillion) which has the Windows XP operating system. It has been working ok for a couple of years and is now causing problems. I was able to import scaned items and photos from files on my hard drive. A couple of days ago, when I tried to do that, I received the following message "[Microsoft [ODBC Microsoft Access Driver] cannot open database]. It may not be a datbase that your application recognizes or the file may be corrupt." I was also not able to import photos directly from my camera chip. Is this an Adobe problem or a MS problem? Any suggestions as to how to fix? Thanks. Hank

    Hello Barb,
    Thanks for your suggestion. Unfortunately that didn't work. When I clicked on "recover" it appeared to go to 66% and then the computer froze up. I had to do a "hard" shutdown.
    I've done a defrag which the system told me was not necessary. That didn't help. I have approx 50% of free space on my hard drive. So I don't think space is an issue.
    For the past few months both the HP photo package and Adobe have been opening when I download photos from my camera. Is it possible that the two programs are somehow interferring with each other. On my last download, the photos wouldn't download to PSE3 and i received the ODBC error message. The photos did download to the HP program.
    I also tried to reinstall the PSE3 program but I received a message that said I currently have a more recent version of Adobe (I suspect that is a reference to the Adobe Reader program) and terminated the installation.
    I'm open to any suggestions. Thanks Hank

  • Please Help me: Access Denied error

    Dear All,
    Till yesterday I was able to edit my forms in adobe workbench.But, today I met an error while accessing my form.I tried restarting my JBOSS and my machine as well.But still getting the same error!
    can anyone help me?
    Attaching the screen shot of my error for your reference.
    Thanks in advance,
    Vinod

    My days of dealing with Java are getting farther and farther in the past, but I'll give it a shot. There is a property that is used to stamp the os user of where the Oracle session originated called v$session.osuser. The access denied is coming from the java.security.AccessControlException class.
    Usually something like this needs to be granted. Most shops just dump this into a policy file.
    grant {
      permission java.security.AllPermission;
    };Probably not a good idea, but that depends... on whether you are the end user or the programmer. If you are the programmer, you should read the docs:
    http://java.sun.com/developer/onlineTraining/Programming/JDCBook/appA.html#PropertyPermission
    grant {
      permission java.util.PropertyPermission
         "v$session.osuser", "read";
    };Good luck.

  • Help Need New Driver For MG2100 Where Is It?

    I am having a hard time finding the driver for Canon Printer all in one the MG2100 series where is that can not find it please help also when I needed to print out my homegroup setup with password I get a error and it wont print help please ty 
    Error Code is 2147500037 

    Hi CynthiaAvey,
    Thanks for your reply!  We suspect you may have the PIXMA MG2120 printer, which often appears with the the phasing "2100 Series" on the manual and packaging.  However, the official model number can be found on the unit itself, typically on or near the control panel.  If the PIXMA MG2120 is indeed your printer, you can download the driver from the following page: 
    http://usa.canon.com/cusa/consumer/products/printers_multifunction/photo_all_in_one_inkjet_printers/...
    However, if you do have a different printer, or the link above did not allow your PIXMA MG2120 to continue printing, please visit the link below for further assistance.  Thanks so much! 
    http://www.usa.canon.com/cusa/consumer/standard_display/contact_us_consumer
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Help Needed on 1619 error while upgrading to 2.01

    Hi, I have an iPhone that during the uprgrade to version 2.01 decided to display an error 1619 (basically it says that it cannot determine what is plugged into it). I have spoken to support three times and whilst helpful we have not as yet been able to solve the problem. We have tried all the obvious which includes removing ALL apple related software (I'm running a PC with Vista), turning off ALL other running applications, defraging the drive, using restore mode, which does nothing but display the same error message, creating another user account on the pc and trying all that again. As mentioned I have followed the RESTORE iPhone process to the letter but it still gives me the same message. Unfortunatly I am from home and Apple needs my serial number for the iPhone which I cannot get as it is store in the phone. I do not carry the iPhone box around with me so that is not an option. I am away for a month and need my phone to be working. Does anyone have any suggestions for one very frustrated user.
    Martyn

    I had the same problem. Try to unplag your iPod, reset it (hold the home and the power button simultaneously), and then plug it again.

  • HELP Needed with this error:   Exception in thread "main" java.lang.NoClass

    Folks,
    I am having a problem connecting to my MSDE SQL 2000 DB on a WindowsXP pro. environment. I am learning Java and writing a small test prgm to connect the the database. The code compiles ok, but when I try to execute it i keep getting this error:
    "Exception in thread "main" java.lang.NoClassDefFoundError: Test1"
    I am using the Microsoft jdbc driver and my CLASSPATH is setup correctly, I've also noticed that several people have complained about this error, but have not seen any solutions....can someone help ?
    Here is the one of the test programs that I am using:
    import java.sql.*;
    * Microsoft SQL Server JDBC test program
    public class Test1 {
    public Test1() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://LAPTOP01:1433","sa","sqladmin");
    if (connection != null) {
    System.out.println();
    System.out.println("Successfully connected");
    System.out.println();
    // Meta data
    DatabaseMetaData meta = connection.getMetaData();
    System.out.println("\nDriver Information");
    System.out.println("Driver Name: "
    + meta.getDriverName());
    System.out.println("Driver Version: "
    + meta.getDriverVersion());
    System.out.println("\nDatabase Information ");
    System.out.println("Database Name: "
    + meta.getDatabaseProductName());
    System.out.println("Database Version: "+
    meta.getDatabaseProductVersion());
    } // Test
    public static void main (String args[]) throws Exception {
    Test1 test = new Test1();

    I want to say that there was nothing wrong
    with my classpath config., I am still not sure why
    that didn't work, there is what I did to resolved
    this issue.You can say that all you like but if you are getting NoClassDefFound errors, that's because the class associated with the error is not in your classpath.
    (For future reference: you will find it easier to solve problems if you assume that the problem is your fault, instead of trying to blame something else. It almost always is your fault -- at least that's been my experience.)
    1. I had to set my DB connection protocol to TCP/IP
    (this was not the default), this was done by running
    the
    file "svrnetcn.exe" and then in the SQL Server Network
    Utility window, enable TCP/IP and set the port to
    1433.Irrelevant to the classpath problem.
    2. I then copied all three of the Microsoft JDBC
    driver files to the ..\jre\lib\ext dir of my jdk
    installed dir.The classpath always includes all jar files in this directory. That's why doing that fixed your problem. My bet is that you didn't have the jar file containing the driver in your classpath before, you just had the directory containing that jar file.
    3. Updated my OS path to located these files
    and....BINGO! (that simple)Unnecessary for solving classpath problems.
    4. Took a crash course on JDBC & basic Java and now I
    have created my database, all tables, scripts,
    stored procedures and can read/write and do all kinds
    of neat stuff.All's well that ends well. After a few months you'll wonder what all the fuss was about.

  • Please Help needed...Error while generating WebService Proxy..!!

    Hi...
    I am getting an Error when i try to generate a Web-Service Proxy on JDeveloper for one of the Oracle WorkFlow Services viz., the[b] "TaskService"
    ie.,
    http://host:port/integration/services/TaskService/TaskServicePort?wsdl
    The wizard exits with a fatal warning ( WS-30033 -- which i believe indicates Validation of the WSDL failed..!?!) saying
    "uniqueness constraint violation : exception (taskProxy.proxy.faultType already exists)
    Could Anyone please Help me w.r.t this..?!?
    My requirement is to provide a UI for accessing Human WorkFlow Services...other than JSP...So, i am planning to create a Web-Service PROXY for the important Workflow Services like TaskQueryService, TaskService, etc...& then use the "jars" of these clients to invoke the Web-Services...!
    Is there ANY Simpler method of doing this..?!?
    I've seen the Code of the UserSampleUI application, but i can't get a similar code working in my Eclipse...don't know Which JARS are required...?!
    [i tried bpm-services.jar, & others...but it gives me a run-time exception of type PC Exception...!! :(]
    If so, please Do let me know ASAP...!!
    [By the way, ALL this is w.r.t. the [b]10.1.3.1.0 version of[b] Oracle SOA Suite...]
    Awaiting some response....
    Thanks a lot in advance..!

    Hi Calvin,
    You may want to try the 'no data binding' option on the proxy generation. This may enable you to go ahead, with a proxy that is not trying to generate Java code.
    Yo can also try to make a local copy of your WSDL and remove the duplicate type declaration. Using the analyze command from WSA CLI is a quick way to do this itterative testing, as it will not generate the code. Once you have the analyze command going thourg the WSDL, you can go back to using genProxy.
    You can find the documnetation here:
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b28974/wsassemble.htm#CHDBBDBF
    Hope it helps,
    -Eric

  • Urgent help needed on writing errors in to windows events application logs

    Hi all,
    we have web based application. Whenever there is critical errors encounters in our application we need to write that errors in to windows
    event viewer, application logs. Please help me on how to do this.
    do we have any specific API for this ?
    thanks in advance
    Shivakumar

    You should use WinAPI to do so. Asking in JNI forum (or specialized WinAPI forum) for more details is good idea I think.

  • Urgent help needed on writing errors in to windows application logs

    Hi all,
    we have web based application. Whenever there is critical errors encounters in our application we need to write that errors in to windows
    event viewer, application logs. Please help me on how to do this.
    do we have any specific API for this ?
    thanks in advance
    Shivakumar

    You should use WinAPI and followed functions: RegisterEventSource(), ReportEvent() and may be some more. It was some time ago as I deal with...

  • Help needed with coding error message

    I have a webpage in which I have inserted a mortgage calculator widget from zillow.  Everything looks good on browser view...but errors when validating. 
    This is where I downloaded the widget. 
    www.zillow.com/webtools/widgets/MortgageCalculatorWidget.htm
    Here is my html code for the page:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <!--<![endif]-->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>financing</title>
    <link href="../../boilerplate.css" rel="stylesheet" type="text/css">
    <link href="../../styles.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    body {
              background-color: #F9F8F6;
    background-image: url(file:///C|/Users/Kim/Documents/Kim's_New_PQH_website/Assets/Images/background_texture _blue159.jpg);
    </style>
    <link href="../../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    a:hover {
              color: #009900;
    </style>
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="../../respond.min.js" type="text/javascript"></script>
    <script src="../../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="LayoutDiv1"><img src="../Images/newbannernewlogo.jpg" alt="NewbannerNewLogo"></div>
      <div id="Navigation">
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li>
            <div><a href="#">Home</a> </div>
          </li>
          <li>
            <div><a href="#" class="MenuBarHorizontal">Home Plans</a></div>
          </li>
          <li>
            <div><a href="#">New Homes / Lots</a> </div>
          </li>
          <li>
            <div><a href="#">Gallery</a> </div>
          </li>
          <li>
            <div><a href="#">Financing</a> </div>
          </li>
          <li>
            <div><a href="#">About Us</a> </div>
          </li>
          <li>
            <div><a href="#">Contact Us</a> </div>
          </li>
        </ul>
      </div>
      <div id="finance_pic"><img src="../Images/finance pic.jpeg" alt="finance_pic" width="65%" height="282"></div>
      <div id="finance_info">
        <p>By using a mortgage calculator, you can save time by focusing on homes that fit your budget. There are many types of loans available including:  </p>
      </div>
      <div id="loan_choices">
        <ul type="square">
          <li><a href="http://homeguides.sfgate.com/conventional-loans-2669.html">Conventional FNMA</a></li>
          <li><a href="http://banking.about.com/od/mortgages/a/FHALoans.htm">FHA</a></li>
          <li><a href="http://www.benefits.va.gov/homeloans/">VA</a></li>
          <li>Little or no money down w.a.c.</li>
        </ul>
      </div>
      <div id="finance_into">
        <p>Finding the right financing to purchase your new home from pre-qualifying to close is as important, if not more important than finding your dream home itself.</p>
        <p> you have your own financing or you wish to utilize a Preferred Quality Homes lender, PQH will ensure that you have the best financing to meet your needs and make your dreem home become a reality.</p>
      </div>
      <div id="mortgage_cal"><div id="horizontalWidget" style="width:370px;overflow:hidden;text-align:center;font-family:verdana,arial,sans-serif ;font-size:8pt;line-height:13x;background-color:#3399cc;letter-spacing:0;text-transform:no ne;border-radius: 5px;webkit-border-radius:5px;"><div style="margin:6px 0;"><a href="http://www.zillow.com/mortgage-calculator/" target="_blank" title="Mortgage Calculators on Zillow" style="font-family:Arial;font-size:15px;text-decoration:none;font-weight:bold;color:#f0f2 f4;cursor: pointer;display: block;text-align: center;text-shadow: 0 1px #000;">Calculate Payment</a></div><div style="width:352px;margin:0 auto;background-color:#e3f2f9;text-align:left; font-size:8pt;border-radius: 5px; border: 1px solid;border-color:#2e84ae;webkit-border-radius: 5px;padding: 0 1px;"><iframe title="Mortgage Calculator" frameborder="0" height="235px" style="float:left;" scrolling="no" width="352px" src="http://www.zillow.com/mortgage/SmallMortgageLoanCalculatorWidget.htm?price=400000&wtype=sp c&rid=102001&wsize=small&textcolor=3399cc&backgroundColor=e3f2f9&advTabColor=5ba0c1&bgcolo r=3399cc&bgtextcolor=f0f2f4&headerTextShadow=000&widgetOrientationType=horizontalWidget"> Your browser doesn't support frames. Visit <a href="http://www.zillow.com/mortgage-calculator/" target="_blank" style="text-decoration:none; font-size:9pt; font-weight:bold;">Zillow Mortgage Calculators</a> to see this content. </iframe><diV style="clear:both;"></div></div><div style="height:20px;"><span style="display:block;margin:0 auto;font-size:7pt;height:15px;width:178px;color:#f0f2f4;padding-top:2px;"><a href="http://www.zillow.com/mortgage-rates/" target="_blank" title="Zillow Mortgage Marketplace" style="text-decoration:none;color:#3366bb;font-weight:normal;font-family:verdana,arial,sa ns-serif;font-size:7pt;color:#f0f2f4;">Zillow Home Loan Calculator</a></span></div></div></div>
    <div id="BottomNav">
      <div>
          <div>Home  |  Our Homes  |  Neighborhoods  |  Gallery  |  Financing  |  About Us  |  Contact Us </div>
        </div>
    </div>
      <div id="PriceAvail">
        <div>
          <div>Pricing and Availability are subject to change without notice</div>
        </div>
      </div>
      <div id="Footer">
        <div>
          <div>Copyright &copy; 2012 PreferredQualityHomes.com, pqualityhomes.com, pqhhomes.com, &amp; Preferred Quality Homes, L.L.C. All rights reserved. Last updated 10/31/12</div>
        </div>
      </div>
    </div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>
    ANY help would be appreciated!  
    Kim

    Can you tell me how to do that?
    On Jul 25, 2013 10:26 PM, "mytaxsite.co.uk" <[email protected]

  • [Solved] Help needed to interpret errors (python)

    Have the following code (Haven't written it my self and don't know much about how it does what it's supposed to do.):
    #!/usr/bin/python
    import sys
    import os
    import re
    import logging
    import json
    if sys.version_info < (3, 0):
    from urllib2 import Request
    from urllib2 import urlopen
    from urlparse import urlparse
    else:
    from urllib.request import Request
    from urllib.request import urlopen
    from urllib.parse import urlparse
    raw_input = input
    useragent = 'Mozilla/5.0'
    headers = {'User-Agent': useragent}
    intro = """
    Usage: drdown.py url
    This script finds the stream URL from a dr.dk page so you can
    download the tv program.
    def fetch(url):
    """Download body from url"""
    req = Request(url, headers=headers)
    response = urlopen(req)
    body = response.read()
    response.close()
    # convert to string - it is easier to convert here
    if isinstance(body, bytes):
    body = body.decode('utf8')
    return body
    class StreamExtractor:
    def __init__(self, url):
    self.url = url.lower()
    self.urlp = urlparse(self.url)
    def get_stream_data(self):
    """supply a URL to a video page on dr.dk and get back a streaming
    url"""
    if self.urlp.netloc not in ('dr.dk', 'www.dr.dk'):
    raise Exception("Must be an URL from dr.dk")
    self.html = fetch(self.url)
    logging.info("Player fetched: " + self.url)
    # Standalone show?
    if self.urlp.path.startswith('/tv/se/'):
    return self.get_stream_data_from_standalone()
    # Bonanza?
    elif self.urlp.path.startswith('/bonanza/'):
    return self.get_stream_data_from_bonanza()
    # Live tv?
    elif self.urlp.path.startswith('/tv/live'):
    return self.get_stream_data_from_live()
    else:
    return self.get_stream_data_from_series()
    def get_stream_data_from_rurl(self, rurl):
    """Helper method to parse resource JSON document"""
    body = fetch(rurl)
    resource_data = json.loads(body)
    qualities = resource_data.get('links')
    # sort by quality
    qualities = sorted(qualities, key=lambda x: x['bitrateKbps'],
    reverse=True)
    stream_data = qualities[0]
    stream_url = stream_data.get('uri')
    logging.info("Stream data fetched: " + stream_url)
    playpath, filename = self.get_metadata_from_stream_url(stream_url)
    stream_data = {'stream_url': stream_url,
    'playpath': playpath,
    'filename': filename,
    'is_live': False}
    return stream_data
    def get_metadata_from_stream_url(self, stream_url):
    """Helper method to extacts playpath and filename suggestion from a
    rtmp url"""
    parsed = urlparse(stream_url)
    playpath_s = parsed.path.split('/')[2:]
    playpath = '/'.join(playpath_s)
    # rerun to split the parameter
    path = urlparse(parsed.path).path
    filename = path.split('/')[-1]
    return playpath, filename
    def get_stream_data_from_standalone(self):
    """Extracts stream data from a normal single program page.
    The data is hidden in a resource URL, that we need to download
    and parse.
    mu_regex = re.compile('resource: "([^"]+)"')
    m = mu_regex.search(self.html)
    if m and m.groups():
    resource_meta_url = m.groups()[0]
    return self.get_stream_data_from_rurl(resource_meta_url)
    def get_stream_data_from_bonanza(self):
    """Finds stream URL from bonanza section. Just pick up the first RTMP
    url.
    stream_regex = re.compile('rtmp://.*?\.mp4')
    m = stream_regex.search(self.html)
    if m and m.group():
    stream_url = m.group()
    else:
    raise Exception("Could not find Bonanza stream URL")
    playpath, filename = self.get_metadata_from_stream_url(stream_url)
    stream_data = {'stream_url': stream_url,
    'playpath': playpath,
    'filename': filename,
    'is_live': False}
    return stream_data
    def get_stream_data_from_live(self):
    stream_url = 'rtmp://livetv.gss.dr.dk/live'
    quality = '3'
    playpaths = {'dr1': 'livedr01astream',
    'dr2': 'livedr02astream',
    'dr-ramasjang': 'livedr05astream',
    'dr-k': 'livedr04astream',
    'dr-update-2': 'livedr03astream',
    'dr3': 'livedr06astream'}
    urlend = self.urlp.path.split('/')[-1]
    playpath = playpaths.get(urlend)
    filename = 'live.mp4'
    if playpath:
    playpath += quality
    filename = urlend + '.mp4'
    stream_data = {'stream_url': stream_url,
    'playpath': playpath,
    'filename': filename,
    'is_live': True}
    return stream_data
    def get_stream_data_from_series(self):
    """dr.dk has a special player for multi episode series. This is the
    fall back parser, as there seems to be no pattern in the URL."""
    slug_regex = re.compile('seriesSlug=([^"]+)"')
    m = slug_regex.search(self.html)
    if m and m.groups():
    slug_id = m.groups()[0]
    else:
    raise Exception("Could not find program slug")
    logging.info("found slug: " + slug_id)
    program_meta_url = 'http://www.dr.dk/nu/api/programseries/%s/videos'\
    % slug_id
    body = fetch(program_meta_url)
    program_data = json.loads(body)
    if not program_data:
    raise Exception("Could not find data about the program series")
    fragment = self.urlp.fragment
    if fragment.startswith('/'):
    fragment = fragment[1:]
    fragment = fragment.split('/')
    video_id = fragment[0]
    logging.info("Video ID: " + video_id)
    video_data = None
    if video_id:
    for item in program_data:
    if item['id'] == int(video_id):
    video_data = item
    if not video_data:
    video_data = program_data[0]
    resource_meta_url = video_data.get('videoResourceUrl')
    return self.get_stream_data_from_rurl(resource_meta_url)
    def generate_cmd(self):
    """Build command line to download stream with the rtmpdump tool"""
    sdata = self.get_stream_data()
    if not sdata:
    return "Not found"
    filename = sdata['filename']
    custom_filename = raw_input("Type another filename or press <enter> to keep default [%s]: " % filename)
    if custom_filename:
    filename = custom_filename
    cmd_live = 'rtmpdump --live --rtmp="%s" --playpath="%s" -o %s'
    cmd_rec = 'rtmpdump -e --rtmp="%s" --playpath="%s" -o %s'
    if sdata['is_live'] is True:
    cmd = cmd_live % (sdata['stream_url'], sdata['playpath'], filename)
    else:
    cmd = cmd_rec % (sdata['stream_url'], sdata['playpath'], filename)
    return cmd
    def main():
    if len(sys.argv) > 1:
    url = sys.argv[1]
    extractor = StreamExtractor(url)
    cmd = extractor.generate_cmd()
    os.system(cmd)
    else:
    print(intro)
    if __name__ == "__main__":
    main()
    When I run the script with an appropriate URL as parameter, I get this:
    Traceback (most recent call last):
    File "./drdown.py", line 243, in <module>
    main()
    File "./drdown.py", line 235, in main
    cmd = extractor.generate_cmd()
    File "./drdown.py", line 211, in generate_cmd
    sdata = self.get_stream_data()
    File "./drdown.py", line 65, in get_stream_data
    return self.get_stream_data_from_standalone()
    File "./drdown.py", line 123, in get_stream_data_from_standalone
    return self.get_stream_data_from_rurl(resource_meta_url)
    File "./drdown.py", line 87, in get_stream_data_from_rurl
    reverse=True)
    TypeError: 'NoneType' object is not iterable
    I should note that I didn't expect it to work out of the box, but so far I've been unable even to figure out what the problem is, no less solve it.
    I've tried my best to go through the code, looking for typos and such, but I haven't had any luck and much of what happens I don't really understand.
    So please, if you can, I'd very much appreciate a little help.
    Best regards.
    NB:
    Some might conclude that this script does something illegal. In actuality that is not so, just make that clear. Also, testing from outside Denmark, will probably not be possible.
    Last edited by zacariaz (2013-11-08 18:00:33)

    Trilby wrote:
    zacariaz wrote:Have the following code (Haven't written it my self and don't know much about how it does what it's supposed to do.)
    You know a lot more than we do: like where you then found this code, and what it is supposed to do.
    My only first thought without looking through random code that allegedly serves some unknown purpose and comes from some unknown source is that the shebang is ambiguous: it may be a python 2 script while /usr/bin/python is now python 3.
    I've pretty much concluded that python 3.3 is the right choice, sp that should not be a problem, as for what it does, it uses "rtmpdump" to record or "rip" video from a danish site "dr.dk", which is a public service television network.
    I have it from reliable sources that this actually works, or at least did at some point, on Windows machines, but of course i'm on linux, and that complicated matters.
    All in all, as I understand it, what the script really does, is retrieving the relevant rtmp link. The rest is up to "rmtpdump" which I should be able to manage.
    In any case, I'm not really that concerned with learning what the script does at this point, but rather what the error mean.
    The only actual error description I see is: "TypeError: 'NoneType' object is not iterable" and I haven't a clue what that implies. I've read through the script, but haven't been able to find any obvious flaws..

  • Help Needed: Facing the error ORA-01406: fetched column value was truncated

    Hi Everyone,
    When I run a particular PL/SQL query using Oracle 9i ODBC driver, it is working fine and fetching me the desired results.
    However, when I run the same query using the Oracle 10g ODBC driver, I am getting the error: ORA-01406: fetched column value was truncated.
    I have checked all the fields of the table and they are well within the allowable limit.
    Can you please let us know what needs to be done to resolve this issue?
    Thanks and Regards,
    Sudhindra

    Well it's obviously a problem with the client software. Doesn't Datastage have some way of configuring these things?
    rgds, APC

  • IrisPen Express - help needed with driver no loading

    Anyone use IrisPen (Express or Executive; they don't sell IrisPen II anymore) with their MacBook (I'm using os.10.4.8)? I used IrisPen II with my old Windows and the hand scanner worked great. But it was old and not working well.
    Bought new IrisPen Express & after installing software & rebooting (putting pen into USB after installation & before restarting) the software still doesn't recognize the pen. It says: "pen unplugged; driver unloaded."
    Tried everything I can think of. Called IrisPen (un)support help desk and they recommended testing the pen. Instead I bought another new IrisPen, thinking my 1st pen was bum. Now 2nd pen still a problem. Get exact same error message!!
    IrisPen supposed to work with Mac os.x
    Any ideas?

    Had to use the Basic connection type and get the right combination of options. I can now connect to my remote Express server with my local sql developer program.

Maybe you are looking for