FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour New AdoRDD (free)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

New AdoRDD (free)

Posted: Mon May 07, 2007 09:40 AM
2007-05-07 11:28 UTC+0100 Antonio Linares (alinares@fivetechsoft.com)
   * contrib/adordd/adordd.prg
     * INDEX ON ... Implementation
     * OrdListClear() and OrdListAdd() implementation

INDEX ON ... its working though it does not support all possible clauses yet

www.fivetechsoft.com/files/adordd.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 32
Joined: Sun Dec 03, 2006 12:05 PM

AdoRdd

Posted: Mon May 07, 2007 11:00 AM

Called from: => ADO_OPEN(221)
Faz referencia - DRIVER={MySQL ODBC 3.51 Driver}

S.A.Oliveira

Lins-SP - Brasil

FWH 10.9, PellesC,MySql
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

New AdoRDD (free)

Posted: Wed May 09, 2007 08:44 AM
2007-05-09 10:41 UTC+0100 Antonio Linares (alinares@fivetechsoft.com)
   * contrib/adordd/adordd.prg
     + New functions HB_AdoRddGetConnection( [<nWorkArea>] ) --> oAdoConnection
       and HB_AdoRddGetCatalog( [<nWorkArea>] ) --> oAdoCatalog


www.fivetechsoft.com/files/adordd.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

New AdoRDD (free)

Posted: Wed May 09, 2007 08:57 AM
2007-05-09 10:55 UTC+0100 Antonio Linares (alinares@fivetechsoft.com)
   * contrib/adordd/adordd.prg
     + Added function HB_AdoRddGetRecordSet( [<nWorkArea>] ) --> oAdoRecordset


www.fivetechsoft.com/files/adordd.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

New AdoRDD (free)

Posted: Thu May 10, 2007 03:52 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

New AdoRDD (free)

Posted: Sat May 12, 2007 09:02 AM
2007-05-12 10:48 UTC+0100 Antonio Linares (alinares@fivetechsoft.com)
   * contrib/adordd/adordd.prg
     * OrdCreate() fixed 
     * OrdDestroy() implemented


www.fivetechsoft.com/files/adordd.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

New AdoRDD (free)

Posted: Sun May 13, 2007 04:34 PM
I have the following connection string that works fine in ASP:

"Provider=sqloledb;Data Source=xxx.xxx.xxx.xxx;User Id=MyUserid;Password=MyPasswd"


How do I have to use it with ADORDD? I tried:

USE "MyTable" VIA "ADORDD" TABLE "MyTable" FROM "xxx.xxx.xxx.xxx" USER "MyUserid" PASSWORD "MyPasswd" SQL


and many other combinations without success (I get Open failed error).

EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

New AdoRDD (free)

Posted: Sun May 13, 2007 07:53 PM

Enrico,

You may modify adordd.ch and adordd.prg to accept a CONSTRING clause (or another name), and then from adordd.prg use your connection string as it is, i.e.:

USE "MyTable" VIA "ADORDD" CONSTRING "Provider=sqloledb;Data Source=xxx.xxx.xxx.xxx;User Id=MyUserid;Password=MyPasswd" ALIAS "MyAlias"

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

New AdoRDD (free)

Posted: Sun May 13, 2007 07:59 PM

Ok, but I think it would be better if MSSQL support were built-in in standard ADORDD version, isn't it?

EMG

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

New AdoRDD (free)

Posted: Sun May 13, 2007 07:59 PM

Antonio

I sent you a private message this morning on the SQL index issue .. no luck.

I have been developing this app in parrallel using ado methods and adordd.. I think MS SQL and Oracle are a lot alike in that they really only use indexes if the execution plan will create a faster result .. I don't think MS SQL indexes are part of the SQL engine ADO can manipulate :(.

Let me know if I can help test further ..

Rick Lipkin

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

New AdoRDD (free)

Posted: Sun May 13, 2007 08:08 PM

Enrico

As you may have seen from my last post .. I have been working in tandum with standard ADO and ADORDD for the MS SQL project.

This snipit of code works well for me .. indexes in MS SQL seem to be a bit 'sticky' as of yet .. I am sure Antonio will find a solution.

Rick Lipkin

INCLUDE "ADORDD.CH"

REQUEST ADORDD

cFROM := "xxx"
cUSER := "xxxr"
cPSW := "xxx"
cDBF := "test"
cTABLE := "USERINFO"

TRY

SELECT 1
USE (AllTrim(cDbf)) VIA "ADORDD" TABLE AllTrim(cTable) SQL ;
FROM AllTrim(cFrom) USER AllTrim(cUser) PASSWORD AllTrim(cPsw)

SET INDEX to USERID // doesn't see

CATCH oERR
MsgInfo( "Error in Opening USERINFO table" )
oDlg:End()
RETURN(.F.)
END TRY

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

New AdoRDD (free)

Posted: Sun May 13, 2007 08:13 PM
Enrico,

adordd.prg provides support for MSSQL:
      case aWAData[ WA_ENGINE ] == "SQL" 
           aWAData[ WA_CONNECTION ]:Open( "Provider=SQLOLEDB;" + ; 
                                          "server=" + aWAData[ WA_SERVER ] + ; 
                                          ";database=" + aOpenInfo[ UR_OI_NAME ] + ; 
                                          ";uid=" + aWAData[ WA_USERNAME ] + ; 
                                          ";pwd=" + aWAData[ WA_PASSWORD ] )

But you have to provide the database name, server address, user and password, besides the table name too.

In your connection string there is no a database name
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

New AdoRDD (free)

Posted: Sun May 13, 2007 08:18 PM

Rick,

I got your emails. Its better if we discuss the ADORDD here, so others can participate too.

> I don't think MS SQL indexes are part of the SQL engine ADO can manipulate

We have only tested Access and MySQL, so you are our official MsSQL tester :-)

We assume that ADO provides a common interface for all databases engines, but there may be some differences between them (?)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

New AdoRDD (free)

Posted: Sun May 13, 2007 08:27 PM

Rick,

Please try this, after the USE ...:

MsgInfo( HB_AdoRddGetCatalog():Tables( cTableName ):Indexes:Count )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

New AdoRDD (free)

Posted: Sun May 13, 2007 08:30 PM
Antonio Linares wrote:Enrico,

adordd.prg provides support for MSSQL:
      case aWAData[ WA_ENGINE ] == "SQL" 
           aWAData[ WA_CONNECTION ]:Open( "Provider=SQLOLEDB;" + ; 
                                          "server=" + aWAData[ WA_SERVER ] + ; 
                                          ";database=" + aOpenInfo[ UR_OI_NAME ] + ; 
                                          ";uid=" + aWAData[ WA_USERNAME ] + ; 
                                          ";pwd=" + aWAData[ WA_PASSWORD ] )

But you have to provide the database name, server address, user and password, besides the table name too.

In your connection string there is no a database name


I just tried with

USE "DatabaseName" VIA "ADORDD" TABLE "TableName" FROM "IpAddress" USER "UserId" PASSWORD "Password" SQL


and it won't work anyway.

What am I missing?

EMG