New AdoRDD (free)

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Code: Select all

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
User avatar
Personal
Posts: 32
Joined: Sun Dec 03, 2006 12:05 pm
Location: BRASIL - Lins - SP
Contact:

AdoRdd

Post by Personal »

Called from: => ADO_OPEN(221)
Faz referencia - DRIVER={MySQL ODBC 3.51 Driver}
S.A.Oliveira
Lins-SP - Brasil
FWH 10.9, PellesC,MySql
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Code: Select all

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Code: Select all

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Code: Select all

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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

I have the following connection string that works fine in ASP:

Code: Select all

"Provider=sqloledb;Data Source=xxx.xxx.xxx.xxx;User Id=MyUserid;Password=MyPasswd"
How do I have to use it with ADORDD? I tried:

Code: Select all

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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

EMG
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post by Rick Lipkin »

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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post by Rick Lipkin »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

adordd.prg provides support for MSSQL:

Code: Select all

      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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Rick,

Please try this, after the USE ...:

MsgInfo( HB_AdoRddGetCatalog():Tables( cTableName ):Indexes:Count )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

Antonio Linares wrote:Enrico,

adordd.prg provides support for MSSQL:

Code: Select all

      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

Code: Select all

USE "DatabaseName" VIA "ADORDD" TABLE "TableName" FROM "IpAddress" USER "UserId" PASSWORD "Password" SQL
and it won't work anyway.

What am I missing?

EMG
Post Reply