Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #1978
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Joining MSSQL and Firebird tables |
| Date | 2011-09-08 10:30 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <j4an2f$pqb$1@speranza.aioe.org> (permalink) |
| References | <j47bm1$as3$1@news.siol.net> <9cpk4jF86pU1@mid.individual.net> <j49v0a$nsd$1@news.siol.net> <j4abnn$psp$1@speranza.aioe.org> <j4akp5$472$1@news.siol.net> |
Andrej,
If you put the code with in a begin sequence recover using end sequence you
are probably getting an error from the oCmd:Excute. The error code should
shed some light on why it is working from the management studio and why it
is not working in vo2ado.
Regards,
Willie
"andrej Terkaj" wrote in message news:j4akp5$472$1@news.siol.net...
Hi, Willie !
Yes, I did try also with Adorecordset . Some examples bellow:
METHOD Test_8 CLASS StandardShellWindow
LOCAL oRs as AdoRecordSet
LOCAL oConn as AdoConnection
LOCAL oCmd as AdoCOmmand
oConn := OpenConnection()
oCmd := AdoCommand{}
oCmd:ActiveConnection := oConn
// it works DNEV_PRI and ES_LOKASTOR are tables within MSSQL Server
oCmd:CommandText := "Select CUST_CODE from DNEV_PRI;Select
CUST_NAME,CUST_ADRESS from ES_LOKASTOR"
oCmd:CommandType := AdCmdText
oRs := oCmd:Execute(nil, nil,nil)
? "First set"
ShowResults(oRs)
oRs := oRs:NextRecordset(nil)
IF oRs != null_object
? "Second set"
?
ShowResults(oRs)
ELSE
? "No second set"
ENDIF
// second example --- it works ; TASK_LOKASTOR is a view in a Firebird
database
oConn := Open_FireBirdConn("G:\Program Files\VASCO\10\VASCO.fdb")
oCmd := AdoCommand{}
oCmd:ActiveConnection := oConn
oCmd:CommandText := "Select PART_NAZIV,PART_NASLOV from TASK_LOKASTOR"
oCmd:CommandType := AdCmdText
oRs := oCmd:Execute(nil, nil,nil)
ShowResults(oRs)
// third example it doesn't work
// IBPROVIDER_FIREBIRD ... TASK_LOKASTOR is a linked server/table using
SQL Studio MAnagement and it is linked on a view inside a Firebird DB
oConn := OpenConnection()
oCmd := AdoCommand{}
oCmd:ActiveConnection := oConn
oCmd:CommandText := "BEGIN DISTRIBUTED TRANSACTION Select
PART_NAZIV,PART_NASLOV from IBPROVIDER_FIREBIRD...TASK_LOKASTOR"
oCmd:CommandType := AdCmdText
oRs := oCmd:Execute(nil, nil,nil)
ShowResults(oRs)
// when a use SQL statement "BEGIN DISTRIBUTED TRANSACTION Select
PART_NAZIV,PART_NASLOV from IBPROVIDER_FIREBIRD...TASK_LOKASTOR" from inside
Studio manager
I can see a results
TIA
Andrej Terkaj
"Willie Moore" <williem@wmconsulting.com> wrote in message
news:j4abnn$psp$1@speranza.aioe.org...
> Andrej,
>
> Did you try using an ADORecordset? ADOServer internally uses an
> ADORecordset but it also does a lot of conversions to VO types.
> ADORecordset it just the data.
>
> LOCAL oRS as ADORecordset
> LOCAL cSQL as String
> cSQL := "Select * from Customer"
> oRS := ADORecordset{}
>
> oRS:open(cSQL,SELF:oConn,adOpenForwardOnly,adLockReadOnly,adCmdText) //
> this is a readonly forward only that I use to build a drop down lookup
> if oRS:BOF .and oRS:EOF // no data was returned
> BREAK -1
> ENDIF
>
> Regards,
> Willie
>
> "andrej Terkaj" wrote in message news:j49v0a$nsd$1@news.siol.net...
>
> Hi, Erik !
>
> As I mentioned above my problem can be solved inside a Studio Management.
> Yes, you are right I used a linked server with a IBProvider (I do not know
> if it is an ADO.NET driver, probably no).
> But I would like to have a problem solved inside a VO code --> using
> Vo2Ado
> classes. A child table is a large table with aprox. half million records
> of
> customers.
> Any ideas are welcome.
>
> Andrej
>
>
> "E®!k \/!$$E®" <nospam@nospam.url> wrote in message
> news:9cpk4jF86pU1@mid.individual.net...
>> Andrej,
>>
>> If there is a ADO.NET provider available, you could try to use the linked
>> server facilities from MS SqlServer.
>> Open Management Studio and see under Server Objects - Linked Servers.
>>
>> Never done this, but I am pretty sure this works as it can be done with
>> MySql and Oracle as well.
>> hth
>>
>> Erik
>>
>>
>>
>> "andrej Terkaj" schreef in bericht news:j47bm1$as3$1@news.siol.net...
>>
>> I am trying to join (relate) two different SQL tables MS SQL one (master)
>> and Firebird /Interbase/MySQL as child one using Vo2Ado 2.8 -> Adoserver
>> Connections to a single tables/databases are not a problem. I tried also
>> a
>> MS function known as "linked server". No success. Debuging a VO code it
>> always
>> stops me when I try to initialize Adoserver class. Any ideas ?
>>
>> TIA
>> Andrej Terkaj
>>
>>
>>
>
>
>
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Joining MSSQL and Firebird tables "andrej Terkaj" <aterkaj@task.si> - 2011-09-07 10:38 +0200
Re: Joining MSSQL and Firebird tables "Willie Moore" <williem@wmconsulting.com> - 2011-09-07 07:36 -0500
Re: Joining MSSQL and Firebird tables "andrej Terkaj" <aterkaj@task.si> - 2011-09-07 16:25 +0200
Re: Joining MSSQL and Firebird tables "Willie Moore" <williem@wmconsulting.com> - 2011-09-07 10:45 -0500
Re: Joining MSSQL and Firebird tables E®!k \\/!$$E® <nospam@nospam.url> - 2011-09-07 18:23 +0200
Re: Joining MSSQL and Firebird tables "andrej Terkaj" <aterkaj@task.si> - 2011-09-08 10:20 +0200
Re: Joining MSSQL and Firebird tables "Willie Moore" <williem@wmconsulting.com> - 2011-09-08 07:17 -0500
Re: Joining MSSQL and Firebird tables "andrej Terkaj" <aterkaj@task.si> - 2011-09-08 16:31 +0200
Re: Joining MSSQL and Firebird tables "Willie Moore" <williem@wmconsulting.com> - 2011-09-08 10:30 -0500
Re: Joining MSSQL and Firebird tables "andrej Terkaj" <aterkaj@task.si> - 2011-09-09 12:25 +0200
Re: Joining MSSQL and Firebird tables "Willie Moore" <williem@wmconsulting.com> - 2011-09-09 08:26 -0500
Re: Joining MSSQL and Firebird tables "andrej Terkaj" <aterkaj@task.si> - 2011-09-13 16:27 +0200
Re: Joining MSSQL and Firebird tables E®!k \\/!$$E® <nospam@nospam.url> - 2011-09-08 19:30 +0200
Re: Joining MSSQL and Firebird tables "andrej Terkaj" <aterkaj@task.si> - 2011-09-09 11:57 +0200
csiph-web