Thanks to John Fabiani's tips, I made some progress in narrowing down
the problem of connecting to MS-SQL Server from software run by the Dabo
engine.

It turns out that the Dabo Runtime Installer for MS-Windows
(ftp://dabodev.com/dabo/win/DaboRuntimeSetup.exe and
ftp://dabodev.com/dabo/win/DaboRuntimeSetupConsole.exe) do not include
the pymssql module.  So an attempt to import it, as a result of setting
the DB type to "mssql", fails.

I also found that errors are logged to the file error.log in Dabo's main
directory - something which was not suggested by documentation which a
newcomer would see immediately.

The Dabo Runtime Installer-provided Connection Editor should at least
provide some diagnostics.  Or at least refer the evaluator to error.log.

Since the PC, on which I made the above experiments, has also a regular
Python 2.5.1 installation which includes pymssql, I tried to copy
pymssql.py and _mssql.pyd to Dabo's main directory and to have them
imported.  In another experiment, I added the regular Python 2.5.1
site-packages directory to the import path (sys.path).

Both experiments had the outcome that the following error message "Dabo
Runtime Engine has encountered a problem and needs to close", in a
MS-Windows standard dialog, which offers to send some diagnostic
information to Microsoft (a favor, which I declined).

So, the Dabo Runtime Installer proved to be useless for me.  I'll
install dabo-0.8.3.zip, which will use the regular Python 2.5
installation and evaluate it instead.

[The following part is for Dabo developers]

>From my experience so far, the following improvements to the Dabo
Runtime Installers are advised:

1. Integrate pymssql.py (including the Leafe patch, if necessary), to
   serve people, who already have MS-SQL Server DB, to which they wish
   to connect using Dabo-powered applications.
2. Have the Connection Editor provide detailed diagnostics when testing
   a newly-created connection fails - or at least display a message
   pointing the newbie developer to the appropriate error.log file.
3. It would be a good idea for the Dabo Runtime Installers to reuse
   an existing Python 2.5.1 installation if it is found (by adding the
   appropriate directories to sys.path, and without installing files
   in its standard lib/site-packages).
                                         --- Omer

On Tue, 2008-02-05 at 00:14 -0800, johnf wrote:
> On Monday 04 February 2008 11:23:53 pm Omer Zak wrote:
> > On Mon, 2008-02-04 at 20:38 -0800, johnf wrote:
> > > On Monday 04 February 2008 07:26:22 pm Omer Zak wrote:
> > > > My problem is that the Connection Editor reported failure to establish
> > > > connection, without any diagnostic information whatsoever which could
> > > > help me diagnose the problem.
> > >
> > > If the connection editor reports a failure then nothing else will work. 
> > > Of course the first questions are:
> > >
> > > 1. are you able to make a connection using some other python tool?
> >
> > Yes.  When invoked directly from my own scripts, both pymssql and pyodbc
> > worked.
> >
> > > 2. Is the server running on the local host?
> >
> > Yes.
> >
> > > 3. Are you using Ed Leafe patch?
> >
> > I do not know.  How to check whether this patch is used?
> > The software did update from the Web at 1st activation after
> > installation (in both installation attempts).
> 
> http://dabodev.com/wiki/InstallingPymssql
> >
> > And the most important - where can I find the full error message when
> > the connection editor reports a failure?  Such a message might help me
> > diagnose the problem.  I do not even know if I enter the correct value
> > for the host name or the password or the DB name.
> 
> Omer, 
> 
> The values should be the same as you entered (and got to work) from your 
> scripts.   I have never used pymssql from windows.  So what follows is how 
> I'd go about testing and researching the problem.  
> 
> First review the file dConnectInfo.py.  It should provide some insight.  
> Then I would copy it to a new file and attempt to use it by changing the some 
> of the values.  For example changing the 'DbType' to 'MSSQL'.
> 
> You could also try something like:
> import dabo
> #user = connectInfo.User
> #password = connectInfo.revealPW()
> #database = connectInfo.Database
> 
> conn = dabo.db.dConnection(DbType="mssql", Database="someDB",user 
> ='someuser',password='password')
> #the port will default to 1433
> 
> cur = conn.getDaboCursor()
> 
> 
> Report your errors.  Best run from a DOS window to see the errors.
-- 
Delay is the deadliest form of denial.    C. Northcote Parkinson
My own blog is at http://www.zak.co.il/tddpirate/

My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to