Re: ADOX - Create new query in Access Database



Hi,

.....Thanks for all your help .....
.....
.....

Function TfrmStampeCrystalManager.VerificaViews: boolean;
var Datasource: string;
dbName: string;
sPath, sFileName: string;
RecordsAffected: integer;
begin

Screen.Cursor := crHourGlass;

with TADOCommand.Create( Nil ) do begin

dbName := sPathStampe + '\WorkReports.mdb';
DataSource := 'Provider=Microsoft.Jet.OLEDB.4.0' +
';Data Source=' + dbName +
';Persist Security Info=False';
ConnectionString := Datasource;

//...Crea nuova query v_Prova
CommandText := 'CREATE VIEW v_Prova AS SELECT * FROM DatiPrv';
Execute (RecordsAffected, EmptyParam);

Free;
end;

Screen.Cursor := crDefault;

end;


Giuseppe (Italy)
giuseppe.porzio@xxxxxxxxxx




"Viatcheslav V. Vassiliev" <support@xxxxxxxxxxxxxxx> ha scritto nel
messaggio news:44904f7b$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Execute this command from TADOConnection.Execute():

CREATE VIEW v_Prova AS SELECT * FROM DatiPrv

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)


"Giuseppe Porzio" <giuseppe.porzio@xxxxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:44902444@xxxxxxxxxxxxxxxxxxxxxxxxx
Hello!

This is my question. I'm working with Delphi 6, ADO, MS Access 2000
Database.
I want create a new view (query) in Access database with ADOX library.
This
is my code:

...
dbName := sPathStampe + '\WorkReports.mdb';
DataSource := 'Provider=Microsoft.Jet.OLEDB.4.0' +
';Data Source=' + dbName +
';Persist Security Info=False';
Cat := CoCatalog.Create;
Cat.Set_ActiveConnection ( Datasource );

sSql := 'Select * from DatiPrv';
Cat.Views.Append ('v_Prova', sSql );
....

Compilator return error on sSql parameter of Append method (IDSpatch)

thaks

Giuseppe
Italy






.



Relevant Pages

  • Re: [Full-disclosure] URI handling woes in Acrobat Reader, Netscape, Miranda, Skype
    ... probably a content-type/file association/command string handling problem. ... padding and added IO checking of a very secure app. ... secure programming language or framework. ... hyperventalating over the security of your own code will ever make it ...
    (Full-Disclosure)
  • Re: WSE 3.0, usernameOverTransportSecurity, custom Token Manager w/ securityTokenManager,
    ... I've added the web service call directly to my Data binding method ... expected but not present in the security header of the incoming ... the username token to the message. ... protected override string AuthenticateToken(UsernameToken token) ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: WSE2005: Protection requirements in MutualCertificate11Asserti
    ... error when there is a algorithm mismatch between the client and the ... The Web service is using different security requeriments. ... my client, the response page is a browser page ... message, String messageContentType) ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: WSE2005: Protection requirements in MutualCertificate11Asserti
    ... The solution will be to make my client match the service since ... The Web service is using different security requeriments. ... my client, the response page is a browser page ... message, String messageContentType) ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Secure C library
    ... I read much of the new "security TR", and gee, I don't know. ... the buffer from the buffer size. ... It is not hard to design a better form of buffer and string handling. ... but this is just one example of how thoughtful interface design can ...
    (comp.std.c)