Calling SQL Server With A BlackBerry Phone

  • Cool article, but i'd like to know if you use the blackberry toolkit from and then you use a web service?? or wath did you do?

    thanks alot and nice article


  • It's just a little vbscript on the desktop web server making connections to SQL Servers and issuing SQL queries on those servers.

  • Hi Glen, I've downloaded the files and I'll be looking at them(on and off :-)) during the weekend.

    In a previous reply, you say, "The updated article explains how this enhancement works", where's the updated article?

    In your last reply, you say, "desktop web server". What is it?

  • Nice article.

    As an FYI. BlackBerries can get to https pages as long as the certificate is from a trusted Certificate Authority such as Verisign.


  • Hi Ben,

    Thank you for that update on trusted authorities. Also, while we're in error correction mode, third-party PDF readers are only required for reading downloaded files (not sure why BB doesn't give better support for this).

  • Hi grovelli,

    You need to download the enhanced package from my site:

    which includes the revised article containing the explanation, better IP address handling, and an XML configuration file which self-explains how it can be used to avoid displaying parameters in the browser.

  • Thanks Glen, I've downloaded and extracted all the files in your, what's the name of the file holding the revised article containing the explanation?

    It's just a little vbscript on the desktop web server making connections to SQL Servers and issuing SQL queries on those servers.

    What's a desktop web server?

  • Hi grovelli,

    After you unzip you need to unzip one of its components This will yield the source code (the explanation is in the XML file).

    By desktop web server, I mean IIS that comes with XP Professional (the Home version doesn't offer it).

  • Glen, good article. I have things set, I believe - and and getting a response from my iis - but it is also showing an error occurred...but not much details on what that might be. Below is the page readout -

    Any thoughts would be appreciated -


    Host SQL Server spikenology

    Host SQL Loginspike

    Host SQL Password****

    Host DatabaseImageHost

    Client SQL Serverspikenology

    Client SQL Loginspike

    Client SQL Password****

    Client DatabaseImagesClient

    Host SQL Server is currently specified as:

    Host SQL Server = spikenology

    Host Login = spike

    Host Password = spike2

    Host Database = ImagesHost

    Client SQL Server is currently specified as (required for downloading to client):

    Client SQL Server = spikenology

    Client Login = spike

    Client Password = spike2

    Client Database = ImagesClient

    An error occurred on the server when processing the URL. Please contact the system administrator.

    If you are the system administrator please click here to find out more about this error.

  • Ok you have helplevel = 2 so parameters are displayed showing both databases are connected.

    I assume you are using the package on my web site.

    Can you view an image?

    You could put a line in imagedownload.asp, if you are downlading, to display the openset query (disable the actual call) and then use query analyzer to run it manually.

  • Hi Alen Tiplitsky, who wrote:

    "'s a lot easier done with iphones and android phones. and without the need to keep your home computer on 24/7"

    Can you elaborate with an example; or give a link to more information?


  • I was trying to implement this but got an error on the images.asp screen

    Microsoft OLE DB Provider for ODBC Drivers error '80040e09'

    [Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to 'ImagesHost'.

  • I assume you can open any htm file on your desktop Web directory from your phone, eg.


    where nnn.nnn.nnn.nnn is your server's external IP address.

    Your router must redirect port 1433 to the host machine, and your firewall must not prevent that (you might turn it off temporarily).

    Also, check that you can run any asp file on your server from your phone.

    If not, try running the app directly on your server using its own internal IP address.

    I don't know how you called the images.asp page, but increasing the help level to 2 or 3 might help diagnose the problem:


    You might try adding a response.write(driverHost) statement on the program's driverHost variable to see what it looks like (while disabling the actual connection: connectionHost.Open driverHost).

    That variable is set as:

    driverHost = "DRIVER={SQL Server};SERVER=" & hostServer & ";UID=" & hostLogin & ";PWD=" & hostPassword & ";DATABASE=" & hostDatabase

    The other place where connectivity might be an issue is where you can get the opening page, but you can't retrieve a file that's listed (which resides in the SQL database). For simply viewing a file, go to the image.asp file (not images.asp) and put in the same sort of diagnostics.

    These are the places where things generally fail, and it usually has something to do with simply connecting to the server (the app itself is fairly trivial).

    Basically, if you can connect to your SQL Server from your phone's Web browser using direct calls that by-pass the app, the app should work OK.

Viewing 13 posts - 16 through 27 (of 27 total)

You must be logged in to reply to this topic. Login to reply