Page 6 of 14

Posted: Mon May 07, 2007 9:40 am
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

AdoRdd

Posted: Mon May 07, 2007 11:00 am
by Personal
Called from: => ADO_OPEN(221)
Faz referencia - DRIVER={MySQL ODBC 3.51 Driver}

Posted: Wed May 09, 2007 8:44 am
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

Posted: Wed May 09, 2007 8:57 am
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

Posted: Thu May 10, 2007 3:52 pm
by Antonio Linares

Posted: Sat May 12, 2007 9:02 am
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

Posted: Sun May 13, 2007 4:34 pm
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

Posted: Sun May 13, 2007 7:53 pm
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"

Posted: Sun May 13, 2007 7:59 pm
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

Posted: Sun May 13, 2007 7:59 pm
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

Posted: Sun May 13, 2007 8:08 pm
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

Posted: Sun May 13, 2007 8:13 pm
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

Posted: Sun May 13, 2007 8:18 pm
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 (?)

Posted: Sun May 13, 2007 8:27 pm
by Antonio Linares
Rick,

Please try this, after the USE ...:

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

Posted: Sun May 13, 2007 8:30 pm
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