Alaska Software Inc. - Create Table with ActiveX for Microsoft Access.
Username: Password:
AuthorTopic: Create Table with ActiveX for Microsoft Access.
César Calvo Create Table with ActiveX for Microsoft Access.
on Wed, 22 May 2019 00:35:26 +0200
Hello to all,
I am trying to create a table



oAccess:NewCurrentDatabase(cFIL)

oAccess:Quit()

oAccess := GetObject(cFil,"Access.Application")

cSQL := "CREATE TABLE ThisTable (FirstName CHAR, LastName CHAR);"

oAccess:Execute(cSql)

oAccess:Quit()

oAccess:Destroy()


The execute method dosn´t exist.
Which method is valid for this purpose?

Thanks.


This is the XPPError.log:

ERROR LOG of 
"D:\CCC_PROGRAMACION\CCC_PLANTILLAS_XBASE\SINFOGECO_ACTIVEX_CREAR_BASE_DE_DATOS_ACCESS\SINFOGECO.EXE" 
Date: 22/05/2019 00:30:27

Xbase++ version     : Xbase++ (R) Version 2.00.1095
Operating system    : Windows 10 1809 Build 17763
------------------------------------------------------------------------------
oError:args         :
          -> VALTYPE: C VALUE: Execute
          -> VALTYPE: C VALUE: CREATE TABLE ThisTable (FirstName CHAR, 
LastName CHAR);
oError:canDefault   : Y
oError:canRetry     : N
oError:canSubstitute: Y
oError:cargo        : NIL
oError:description  : Nombre desconocido.
Object has no method with this name
oError:filename     : NIL
oError:genCode      : NIL
oError:operation    : Execute
oError:osCode       :          -2147352570
oError:severity     :          2
oError:subCode      :       6500
oError:subSystem    : Automation
oError:thread       :          1
oError:tries        : NIL
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------

Called from PRUSQL:PRUEBA(124)
Called from PRUSQL:CREATE(76)
Called from MENUSELECT(57)
Called from (B)CREATESDIMENU(24)
Called from APPEXEC(239)
Called from MAIN(52)


Doc1.pdf
Jose Antonio Diego KerejeRe: Create Table with ActiveX for Microsoft Access.
on Wed, 22 May 2019 16:51:48 +0200
Hola César:

Podrías hacerlo de esta manera:

oAccess := CreateObject( "Access.Application")
oAccess:openCurrentDatabase( cFile.mdb )
oAccess:CurrentProject:Connection:Execute( "Create Table NewTable (FirstName 
CHAR, LastName CHAR)" )

Saludos. Diego
César Calvo Re: Create Table with ActiveX for Microsoft Access.
on Wed, 22 May 2019 18:20:19 +0200
Perfecto.

"Jose Antonio Diego Kereje" escribió en el mensaje de 
noticias:246b0428$19a5c369$221f7@news.alaska-software.com...

Hola César:

Podrías hacerlo de esta manera:

oAccess := CreateObject( "Access.Application")
oAccess:openCurrentDatabase( cFile.mdb )
oAccess:CurrentProject:Connection:Execute( "Create Table NewTable (FirstName
CHAR, LastName CHAR)" )

Saludos. Diego