Subject AW: [firebird-support] web access via ODBC to Firebird
Author Thomas Ruger
Hello,

i work with VB, ASP, Dot Net, WebMatrix under Windows 2k, Windows NT,
Windows XP.

I started with Access.mdb, then SQL Server, My Sql and now landed by
Firebird,

but I always test and make my connection string like this:

Create a New File on Desktop, rename it to "test.udl", you have to name it
.udl (Universal Data Link).

Then doppelclick on this udl and you get an gui with all connection
parameters your driver have, you can test it also.

then save it, reopen with an editor and there you can cut and paste the
connectionstring directly into Visual Basic, Global.asa, web.config or
ASP...

The goal for you is, that you can test the connectionstring without
compiling or editing the sourcecode. You can directly change the drivers,
usernames or properties ...

CU

Thomas from Germany, Mannheim

-----Ursprungliche Nachricht-----
Von: Alan McDonald [mailto:alan@...]
Gesendet: Freitag, 24. Oktober 2003 10:03
An: firebird-support@yahoogroups.com
Betreff: RE: [firebird-support] web access via ODBC to Firebird


> Hi,
>
> I am trying to change my .asp web code to access a Firebird database in
> stead of the Access database it uses now.
>
> Is there a good white paper on accessing Firebird through ODBC on
> web pages ?
>
> I get all sorts of strange errors, like odbc errors when testing the BOF
> and EOF markers on a recordset. Do I need to set transactions or so ?
>
> Thanks for any help you might provide me.
>

Erik,
This is a typical global.asa file or whatever you like to use with a
typical
connection setup

<SCRIPT LANGUAGE='VBScript' RUNAT='Server'>
Sub Session_OnStart
End Sub
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
Application("MainConn_ConnectionString") = "DRIVER={Gemini
InterBase ODBC
Driver

2.0};PROTOCOL=2;SERVER=serverordomainname/port;DATABASE=drive:\path\filename
.gdb;VERSION=6;DIALECT=3;OPTIONS=256;UID=userid;PWD=password;"
Application("MainConn_ConnectionTimeout") = 15
Application("MainConn_CommandTimeout") = 30
Application("MainConn_CursorLocation") = 3
End Sub
</SCRIPT>

If you are using another ODBC driver you may need to use a DSN but make
sure
you use tcp naming convention i.e. servername:drive:\path\filename.gdb, do
NOT use local path.

And this is a connection setup:
<script LANGUAGE="JScript" RUNAT="Server">
var DBConn = Server.CreateObject('ADODB.Connection');
DBConn.ConnectionTimeout =
Application('MainConn_ConnectionTimeout');
DBConn.CommandTimeout = Application('MainConn_CommandTimeout');
DBConn.CursorLocation = Application('MainConn_CursorLocation');
DBConn.Open(Application('MainConn_ConnectionString'));
</script>

You don't need transactions unless you need transactions .. :-)
I see no errors with EOF/BOF markers.

Alan



Yahoo! Groups Sponsor
ADVERTISEMENT




To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]