Tienda web:

- poder indicar individualmente qué artículos están en la tienda o no
 - arreglado el problema con ñ y tildes al volcar información a MySQL.

git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@247 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
David Arranz 2008-06-16 16:43:21 +00:00
parent 8539f98d10
commit 344ba18b08
33 changed files with 327 additions and 192 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -59,7 +59,6 @@ end;
function TRptEtiquetasContactos.GenerarEtiquetas(const AID: String): Binary; function TRptEtiquetasContactos.GenerarEtiquetas(const AID: String): Binary;
var var
dsMaster: IDADataset; dsMaster: IDADataset;
dsDetail: IDADataset;
AStream: TMemoryStream; AStream: TMemoryStream;
begin begin

View File

@ -66,7 +66,6 @@ var
dsDataSet: IDADataset; dsDataSet: IDADataset;
AConnection: IDAConnection; AConnection: IDAConnection;
begin begin
Result := False;
AConnection:= dmServer.DarNuevaConexion; AConnection:= dmServer.DarNuevaConexion;
AConnection.BeginTransaction; AConnection.BeginTransaction;
try try

View File

@ -11,7 +11,7 @@ function ActualizarArticulosTienda(ATiendaWeb : IBizTiendaWeb): Boolean;
implementation implementation
uses uses
uArticulosController, uBizArticulos, uArticulosController, uBizArticulos, uStringsUtils,
uOscProductsController, uProveedoresController, uOscManufacturersController, uOscProductsController, uProveedoresController, uOscManufacturersController,
uBizOscManufacturers, uBizOscProducts, uBizOscManufacturers, uBizOscProducts,
uPasswordUtils, schTiendaWebClient_Intf, uDADataTable, uPasswordUtils, schTiendaWebClient_Intf, uDADataTable,
@ -25,7 +25,6 @@ var
AOSCProductController : IOscProductsController; AOSCProductController : IOscProductsController;
AOSCManufacturersController : TOscManufacturersController; AOSCManufacturersController : TOscManufacturersController;
AOSCManufacturer : IBizOscManufacturer; AOSCManufacturer : IBizOscManufacturer;
Resultado : Boolean;
begin begin
Result := True; Result := True;
@ -50,8 +49,8 @@ begin
AOSCProductController.Anadir(AOSCProducts); AOSCProductController.Anadir(AOSCProducts);
with AOSCProducts do with AOSCProducts do
begin begin
products_name := AArticulo.DESCRIPCION; products_name := EscaparCadena(AArticulo.DESCRIPCION);
products_model := AArticulo.REFERENCIA_PROV; products_model := EscaparCadena(AArticulo.REFERENCIA_PROV);
products_date_added := Now; products_date_added := Now;
manufacturers_id := AOSCManufacturer.manufacturers_id; manufacturers_id := AOSCManufacturer.manufacturers_id;
rdx_products_id_local := AArticulo.ID; rdx_products_id_local := AArticulo.ID;
@ -73,7 +72,6 @@ var
AOSCProductController : IOscProductsController; AOSCProductController : IOscProductsController;
AOSCManufacturersController : TOscManufacturersController; AOSCManufacturersController : TOscManufacturersController;
AOSCManufacturer : IBizOscManufacturer; AOSCManufacturer : IBizOscManufacturer;
Resultado : Boolean;
begin begin
Result := True; Result := True;
@ -101,8 +99,8 @@ begin
with AOSCProducts do with AOSCProducts do
begin begin
Edit; Edit;
products_name := AArticulo.DESCRIPCION; products_name := EscaparCadena(AArticulo.DESCRIPCION);
products_model := AArticulo.REFERENCIA_PROV; products_model := EscaparCadena(AArticulo.REFERENCIA_PROV);
products_last_modified := Now; products_last_modified := Now;
manufacturers_id := AOSCManufacturer.manufacturers_id; manufacturers_id := AOSCManufacturer.manufacturers_id;
products_status := 1; products_status := 1;
@ -117,6 +115,47 @@ begin
end; end;
end; end;
function EliminarOSCProduct(AOSCProducts : IBizOscProduct; AArticulo : IBizArticulo) : Boolean;
var
AOSCProductController : IOscProductsController;
AOSCManufacturersController : TOscManufacturersController;
AOSCManufacturer : IBizOscManufacturer;
begin
Result := True;
if not Assigned(AOSCProducts) then
raise Exception.Create ('OSCProducts no asignado (EliminarOSCProduct)');
if not Assigned(AArticulo) then
raise Exception.Create ('Artículo no asignado (EliminarOSCProduct)');
AArticulo.DataTable.Active := True;
AOSCProductController := TOscProductsController.Create;
AOSCProducts.DataTable.Active := True;
AOSCManufacturersController := TOscManufacturersController.Create;
AOSCManufacturer := AOSCManufacturersController.Buscar(AArticulo.ID_PROVEEDOR);
AOSCManufacturer.DataTable.Active := True;
if (AOSCManufacturer.DataTable.RecordCount = 0) then
raise Exception.CreateFmt('No se ha encontrado el proveedor %d en la tienda web (ActualizarOSCProduct)', [AArticulo.ID_PROVEEDOR]);
try
if not AOSCProductController.Localizar(AOSCProducts, AArticulo.ID) then
raise Exception.CreateFmt('No se ha localizado el producto con ID = %d', [AArticulo.ID]);
AOSCProducts.Delete;
AOSCProductController.Guardar(AOSCProducts);
finally
AOSCProductController := NIL;
AOSCManufacturer := NIL;
AOSCManufacturersController := NIL;
end;
end;
function HayCambiosPendientes(AArticulo : IBizArticulo; const UltimaSincro : TDateTime): Boolean; function HayCambiosPendientes(AArticulo : IBizArticulo; const UltimaSincro : TDateTime): Boolean;
begin begin
if not Assigned(AArticulo) then if not Assigned(AArticulo) then
@ -209,27 +248,42 @@ begin
Application.ProcessMessages; Application.ProcessMessages;
end;} end;}
if not AOSCProductController.Localizar(AOSCProducts, AArticulos.ID) then
if (AArticulos.TIENDA_WEB = 0) then
begin begin
s := Format('Añadiendo %15s... ', [AArticulos.DESCRIPCION]); if (AOSCProductController.Localizar(AOSCProducts, AArticulos.ID)) then
Resultado := AnadirOSCProduct(AOSCProducts, AArticulos); begin
if Resultado then s := Format('Eliminado %15s... ', [AArticulos.DESCRIPCION]);
s := s + 'OK' Resultado := EliminarOSCProduct(AOSCProducts, AArticulos);
else if Resultado then
s := s + 'Fallo'; s := s + 'OK'
else
s := s + 'Fallo';
end;
end end
else begin else begin
if HayCambiosPendientes(AArticulos, ATiendaWeb.ULTIMA_ACTUALIZACION) then if not AOSCProductController.Localizar(AOSCProducts, AArticulos.ID) then
begin begin
s := Format('Actualizando %15s... ', [AArticulos.DESCRIPCION]); s := Format('Añadiendo %15s... ', [AArticulos.DESCRIPCION]);
Resultado := ActualizarOSCProduct(AOSCProducts, AArticulos); Resultado := AnadirOSCProduct(AOSCProducts, AArticulos);
if Resultado then if Resultado then
s := s + 'OK' s := s + 'OK'
else else
s := s + 'Fallo'; s := s + 'Fallo';
end end
else else begin
s := Format('%15s... sin cambios', [AArticulos.DESCRIPCION]); if HayCambiosPendientes(AArticulos, ATiendaWeb.ULTIMA_ACTUALIZACION) then
begin
s := Format('Actualizando %15s... ', [AArticulos.DESCRIPCION]);
Resultado := ActualizarOSCProduct(AOSCProducts, AArticulos);
if Resultado then
s := s + 'OK'
else
s := s + 'Fallo';
end
else
s := Format('%15s... sin cambios', [AArticulos.DESCRIPCION]);
end;
end; end;
//ADlg.Expando.Lines.Add(s); //ADlg.Expando.Lines.Add(s);

View File

@ -12,7 +12,7 @@ implementation
uses uses
uClientesController, uOscAddressBookController, uDireccionesContactoController, uClientesController, uOscAddressBookController, uDireccionesContactoController,
uOscCustomersController, uBizOscAddressBook, uBizOscCustomers, uOscCustomersController, uBizOscAddressBook, uBizOscCustomers, uStringsUtils,
uPasswordUtils, schTiendaWebClient_Intf, uDADataTable, uBizContactos, uBizDireccionesContacto, uPasswordUtils, schTiendaWebClient_Intf, uDADataTable, uBizContactos, uBizDireccionesContacto,
schContactosClient_Intf, JSDialogs, uDialogUtils, StrUtils, uIntegerListUtils; schContactosClient_Intf, JSDialogs, uDialogUtils, StrUtils, uIntegerListUtils;
@ -42,15 +42,15 @@ begin
begin begin
Insert; Insert;
rdx_address_book_id_local := ADireccionContacto.ID; rdx_address_book_id_local := ADireccionContacto.ID;
entry_company := ACliente.NOMBRE_COMERCIAL; entry_company := EscaparCadena(ACliente.NOMBRE_COMERCIAL);
entry_gender := OSC_CUSTOMER_GENDER; // No puede ser nulo entry_gender := OSC_CUSTOMER_GENDER; // No puede ser nulo
entry_firstname := ACliente.NOMBRE; entry_firstname := EscaparCadena(ACliente.NOMBRE);
entry_lastname := ''; // No puede ser nulo entry_lastname := ''; // No puede ser nulo
entry_street_address := ADireccionContacto.CALLE; entry_street_address := EscaparCadena(ADireccionContacto.CALLE);
entry_postcode := ADireccionContacto.CODIGO_POSTAL; entry_postcode := EscaparCadena(ADireccionContacto.CODIGO_POSTAL);
entry_city := ADireccionContacto.POBLACION; entry_city := EscaparCadena(ADireccionContacto.POBLACION);
entry_state := ADireccionContacto.PROVINCIA; entry_state := EscaparCadena(ADireccionContacto.PROVINCIA);
entry_telephone := ADireccionContacto.TELEFONO; entry_telephone := EscaparCadena(ADireccionContacto.TELEFONO);
entry_country_id := OSC_CUSTOMER_COUNTRY_ID; // No puede ser nulo entry_country_id := OSC_CUSTOMER_COUNTRY_ID; // No puede ser nulo
entry_zone_id := OSC_CUSTOMER_ZONE_ID; // No puede ser nulo entry_zone_id := OSC_CUSTOMER_ZONE_ID; // No puede ser nulo
Post; Post;
@ -80,15 +80,15 @@ begin
with AOSCAddressBook do with AOSCAddressBook do
begin begin
Edit; Edit;
entry_company := ACliente.NOMBRE_COMERCIAL; entry_company := EscaparCadena(ACliente.NOMBRE_COMERCIAL);
entry_gender := OSC_CUSTOMER_GENDER; // No puede ser nulo entry_gender := OSC_CUSTOMER_GENDER; // No puede ser nulo
entry_firstname := ACliente.NOMBRE; entry_firstname := EscaparCadena(ACliente.NOMBRE);
entry_lastname := ''; // No puede ser nulo entry_lastname := ''; // No puede ser nulo
entry_street_address := ADireccionContacto.CALLE; entry_street_address := EscaparCadena(ADireccionContacto.CALLE);
entry_postcode := ADireccionContacto.CODIGO_POSTAL; entry_postcode := EscaparCadena(ADireccionContacto.CODIGO_POSTAL);
entry_city := ADireccionContacto.POBLACION; entry_city := EscaparCadena(ADireccionContacto.POBLACION);
entry_state := ADireccionContacto.PROVINCIA; entry_state := EscaparCadena(ADireccionContacto.PROVINCIA);
entry_telephone := ADireccionContacto.TELEFONO; entry_telephone := EscaparCadena(ADireccionContacto.TELEFONO);
entry_country_id := OSC_CUSTOMER_COUNTRY_ID; // No puede ser nulo entry_country_id := OSC_CUSTOMER_COUNTRY_ID; // No puede ser nulo
entry_zone_id := OSC_CUSTOMER_ZONE_ID; // No puede ser nulo entry_zone_id := OSC_CUSTOMER_ZONE_ID; // No puede ser nulo
Post; Post;
@ -132,11 +132,11 @@ begin
AOSCCustomerController.Anadir(AOSCCustomers); AOSCCustomerController.Anadir(AOSCCustomers);
with AOSCCustomers do with AOSCCustomers do
begin begin
customers_firstname := ACliente.NOMBRE; customers_firstname := EscaparCadena(ACliente.NOMBRE);
customers_lastname := ''; // No puede ser nulo customers_lastname := ''; // No puede ser nulo
customers_email_address := ACliente.EMAIL_1; customers_email_address := EscaparCadena(ACliente.EMAIL_1);
customers_telephone := ACliente.TELEFONO_1; customers_telephone := EscaparCadena(ACliente.TELEFONO_1);
customers_fax := ACliente.FAX; customers_fax := EscaparCadena(ACliente.FAX);
customers_password := EncriptarPasswordOSC(ACliente.NIF_CIF); customers_password := EncriptarPasswordOSC(ACliente.NIF_CIF);
rdx_customers_id_local := ACliente.ID; rdx_customers_id_local := ACliente.ID;
Post; Post;

View File

@ -11,7 +11,7 @@ function ActualizarProveedoresTienda(ATiendaWeb : IBizTiendaWeb): Boolean;
implementation implementation
uses uses
uProveedoresController, uOscManufacturersController, uProveedoresController, uOscManufacturersController, uStringsUtils,
uBizOscManufacturers, uPasswordUtils, schTiendaWebClient_Intf, uDADataTable, uBizOscManufacturers, uPasswordUtils, schTiendaWebClient_Intf, uDADataTable,
uBizContactos, uBizDireccionesContacto, schContactosClient_Intf, uBizContactos, uBizDireccionesContacto, schContactosClient_Intf,
JSDialogs, uDialogUtils, StrUtils, uIntegerListUtils; JSDialogs, uDialogUtils, StrUtils, uIntegerListUtils;
@ -20,8 +20,6 @@ uses
function AnadirOSCManufacturer(AOSCManufacturers : IBizOscManufacturer; AProveedor : IBizProveedor): Boolean; function AnadirOSCManufacturer(AOSCManufacturers : IBizOscManufacturer; AProveedor : IBizProveedor): Boolean;
var var
AOSCManufacturerController : IOscManufacturersController; AOSCManufacturerController : IOscManufacturersController;
i : Integer;
Resultado : Boolean;
begin begin
Result := True; Result := True;
@ -40,7 +38,7 @@ begin
AOSCManufacturerController.Anadir(AOSCManufacturers); AOSCManufacturerController.Anadir(AOSCManufacturers);
with AOSCManufacturers do with AOSCManufacturers do
begin begin
manufacturers_name := AProveedor.NOMBRE; manufacturers_name := EscaparCadena(AProveedor.NOMBRE);
date_added := Now; date_added := Now;
rdx_manufacturers_id_local := AProveedor.ID; rdx_manufacturers_id_local := AProveedor.ID;
Post; Post;
@ -56,8 +54,6 @@ end;
function ActualizarOSCManufacturer(AOSCManufacturers : IBizOscManufacturer; AProveedor : IBizProveedor) : Boolean; function ActualizarOSCManufacturer(AOSCManufacturers : IBizOscManufacturer; AProveedor : IBizProveedor) : Boolean;
var var
AOSCManufacturerController : IOscManufacturersController; AOSCManufacturerController : IOscManufacturersController;
i : Integer;
Resultado : Boolean;
begin begin
Result := True; Result := True;
@ -79,7 +75,7 @@ begin
with AOSCManufacturers do with AOSCManufacturers do
begin begin
Edit; Edit;
manufacturers_name := AProveedor.NOMBRE; manufacturers_name := EscaparCadena(AProveedor.NOMBRE);
last_modified := Now; last_modified := Now;
Post; Post;
end; end;

View File

@ -39,10 +39,12 @@ type
function Buscar(const ID_Empresa: Integer): IBizTiendaWeb; function Buscar(const ID_Empresa: Integer): IBizTiendaWeb;
function Ver(ATiendaWeb: IBizTiendaWeb) : Integer; function Ver(ATiendaWeb: IBizTiendaWeb) : Integer;
function HayConexionConTienda(ATiendaWeb : IBizTiendaWeb): Boolean; overload; function HayConexionConTienda: Boolean;
function HayConexionConTienda(const ABDServer : String;
{function HayConexionConTienda(ATiendaWeb : IBizTiendaWeb): Boolean; overload;
function HayConexionConTienda(const ABDServer : String;
const ABDName : String; const ABDUser : String; const ABDName : String; const ABDUser : String;
const ABDPass : String): Boolean; overload; const ABDPass : String): Boolean; overload;}
function ActualizarTienda(ATiendaWeb : IBizTiendaWeb): Boolean; function ActualizarTienda(ATiendaWeb : IBizTiendaWeb): Boolean;
function DescargarPedidos(ATiendaWeb : IBizTiendaWeb): Boolean; function DescargarPedidos(ATiendaWeb : IBizTiendaWeb): Boolean;
@ -71,10 +73,11 @@ type
function Buscar(const ID_Empresa: Integer): IBizTiendaWeb; function Buscar(const ID_Empresa: Integer): IBizTiendaWeb;
function Ver(ATiendaWeb: IBizTiendaWeb) : Integer; function Ver(ATiendaWeb: IBizTiendaWeb) : Integer;
function HayConexionConTienda(ATiendaWeb : IBizTiendaWeb): Boolean; overload; function HayConexionConTienda: Boolean;
function HayConexionConTienda(const ABDServer : String; {function HayConexionConTienda(ATiendaWeb : IBizTiendaWeb): Boolean; overload;
function HayConexionConTienda(const ABDServer : String;
const ABDName : String; const ABDUser : String; const ABDName : String; const ABDUser : String;
const ABDPass : String): Boolean; overload; const ABDPass : String): Boolean; overload;}
function ActualizarTienda(ATiendaWeb : IBizTiendaWeb): Boolean; function ActualizarTienda(ATiendaWeb : IBizTiendaWeb): Boolean;
function DescargarPedidos(ATiendaWeb : IBizTiendaWeb): Boolean; function DescargarPedidos(ATiendaWeb : IBizTiendaWeb): Boolean;
@ -120,7 +123,7 @@ begin
Exit; Exit;
end; end;
if not Self.HayConexionConTienda(ATiendaWeb) then if not Self.HayConexionConTienda then
begin begin
ShowErrorMessage('No hay conexión con la tienda web', 'Se ha producido un error al intentar realizar la conexión con la tienda web.' + ShowErrorMessage('No hay conexión con la tienda web', 'Se ha producido un error al intentar realizar la conexión con la tienda web.' +
#10#13 + 'Inténtelo de nuevo pasados unos minutos o revise los datos de conexión a la tienda.'); #10#13 + 'Inténtelo de nuevo pasados unos minutos o revise los datos de conexión a la tienda.');
@ -299,7 +302,7 @@ begin
Exit; Exit;
end; end;
if not Self.HayConexionConTienda(ATiendaWeb) then if not Self.HayConexionConTienda then
begin begin
ShowErrorMessage('No hay conexión con la tienda web', 'Se ha producido un error al intentar realizar la conexión con la tienda web.' + ShowErrorMessage('No hay conexión con la tienda web', 'Se ha producido un error al intentar realizar la conexión con la tienda web.' +
#10#13 + 'Inténtelo de nuevo pasados unos minutos o revise los datos de conexión a la tienda.'); #10#13 + 'Inténtelo de nuevo pasados unos minutos o revise los datos de conexión a la tienda.');
@ -462,7 +465,12 @@ begin
end; end;
function TTiendaWebController.HayConexionConTienda( function TTiendaWebController.HayConexionConTienda: Boolean;
begin
Result := FDataModule.HayConexionConTienda;
end;
{function TTiendaWebController.HayConexionConTienda(
ATiendaWeb: IBizTiendaWeb): Boolean; ATiendaWeb: IBizTiendaWeb): Boolean;
begin begin
if not Assigned(ATiendaWeb) then if not Assigned(ATiendaWeb) then
@ -518,6 +526,6 @@ begin
finally finally
FreeAndNIL(SQLConnection1); FreeAndNIL(SQLConnection1);
end; end;
end; end;}
end. end.

View File

@ -86,6 +86,7 @@ type
function GetOSCOrders: IBizOscOrder; function GetOSCOrders: IBizOscOrder;
function GetOSCOrder(const IDLocal : Integer): IBizOscOrder; function GetOSCOrder(const IDLocal : Integer): IBizOscOrder;
function HayConexionConTienda : Boolean;
end; end;
implementation implementation
@ -379,4 +380,9 @@ begin
end; end;
end; end;
function TDataModuleTiendaWeb.HayConexionConTienda: Boolean;
begin
Result := (RORemoteService as IsrvTiendaWeb).HayConexionConTienda;
end;
end. end.

View File

@ -53,6 +53,8 @@ type
function GetOSCOrder(const IDLocal : Integer): IBizOscOrder; function GetOSCOrder(const IDLocal : Integer): IBizOscOrder;
function GetNextIDOSC(const DataSetName : String) : Integer; function GetNextIDOSC(const DataSetName : String) : Integer;
function HayConexionConTienda : Boolean;
end; end;
implementation implementation

View File

@ -24,13 +24,17 @@ type
aChangeType: TDAChangeType; aChange: TDADeltaChange; aChangeType: TDAChangeType; aChange: TDADeltaChange;
const aCommand: IDASQLCommand; var CanRemoveFromDelta: Boolean; const aCommand: IDASQLCommand; var CanRemoveFromDelta: Boolean;
Error: Exception); override; Error: Exception); override;
procedure GenerateSQL(Sender: TDABusinessProcessor;
ChangeType: TDAChangeType; const ReferencedStatement: TDAStatement;
const aDelta: IDADelta; var SQL: string); override;
end; end;
implementation implementation
uses uses
Dialogs, Variants, uDataModuleServer, uDAClasses, DARemoteService_Impl, Dialogs, Variants, uDataModuleServer, uDAClasses, DARemoteService_Impl,
schTiendaWebClient_Intf, uROClasses, srvTiendaWeb_Impl, Windows; schTiendaWebClient_Intf, uROClasses, srvTiendaWeb_Impl, Windows, uServerMainForm;
{ TBizOscCustomerServer } { TBizOscCustomerServer }
@ -81,6 +85,14 @@ begin
end; end;
end; end;
procedure TBizOscCustomerServer.GenerateSQL(Sender: TDABusinessProcessor;
ChangeType: TDAChangeType; const ReferencedStatement: TDAStatement;
const aDelta: IDADelta; var SQL: string);
begin
inherited;
fServerForm.Memo1.Lines.Add(SQL);
end;
procedure TBizOscCustomerServer.Insert_Customers_Info(aChange: TDADeltaChange); procedure TBizOscCustomerServer.Insert_Customers_Info(aChange: TDADeltaChange);
var var
ASchema : TDASchema; ASchema : TDASchema;

View File

@ -158,8 +158,8 @@ begin
begin begin
ParamByName('products_id').Value := aChange.NewValueByName[fld_osc_Productsproducts_id]; ParamByName('products_id').Value := aChange.NewValueByName[fld_osc_Productsproducts_id];
ParamByName('language_id').Value := AIdiomasDataSet.FieldByName(fld_osc_Languageslanguages_id).Value; ParamByName('language_id').Value := AIdiomasDataSet.FieldByName(fld_osc_Languageslanguages_id).Value;
ParamByName('products_name').Value := TratarCadena(aChange.NewValueByName[fld_osc_Productsproducts_name]); ParamByName('products_name').Value := aChange.NewValueByName[fld_osc_Productsproducts_name];
ParamByName('products_description').Value := TratarCadena(aChange.NewValueByName[fld_osc_Productsproducts_description]); ParamByName('products_description').Value := aChange.NewValueByName[fld_osc_Productsproducts_description];
ParamByName('products_url').Value := null; ParamByName('products_url').Value := null;
ParamByName('products_viewed').Value := 0; ParamByName('products_viewed').Value := 0;
Execute; Execute;
@ -230,8 +230,8 @@ begin
begin begin
ParamByName('OLD_products_id').Value := aChange.OldValueByName[fld_osc_Productsproducts_id]; ParamByName('OLD_products_id').Value := aChange.OldValueByName[fld_osc_Productsproducts_id];
ParamByName('OLD_language_id').Value := AIdiomasDataSet.FieldByName(fld_osc_Languageslanguages_id).Value; ParamByName('OLD_language_id').Value := AIdiomasDataSet.FieldByName(fld_osc_Languageslanguages_id).Value;
ParamByName('products_name').Value := TratarCadena(aChange.NewValueByName[fld_osc_Productsproducts_name]); ParamByName('products_name').Value := aChange.NewValueByName[fld_osc_Productsproducts_name];
ParamByName('products_description').Value := TratarCadena(aChange.NewValueByName[fld_osc_Productsproducts_description]); ParamByName('products_description').Value := aChange.NewValueByName[fld_osc_Productsproducts_description];
ParamByName('products_url').Value := null; ParamByName('products_url').Value := null;
ParamByName('products_viewed').Value := 0; ParamByName('products_viewed').Value := 0;
Execute; Execute;

View File

@ -53,7 +53,7 @@ object PluginTiendaWeb: TPluginTiendaWeb
Tag = 2 Tag = 2
Action = actActualizarTienda Action = actActualizarTienda
end end
object N3: TMenuItem object N1: TMenuItem
Tag = 3 Tag = 3
Caption = '-' Caption = '-'
end end

View File

@ -20,11 +20,11 @@ type
SmallImages: TPngImageList; SmallImages: TPngImageList;
actActualizarTienda: TAction; actActualizarTienda: TAction;
actConfigurarTienda: TAction; actConfigurarTienda: TAction;
Configurartienda1: TMenuItem;
Actualizartienda1: TMenuItem; Actualizartienda1: TMenuItem;
Recogerpedidos1: TMenuItem; Recogerpedidos1: TMenuItem;
iendaweb1: TMenuItem; iendaweb1: TMenuItem;
N3: TMenuItem; Configurartienda1: TMenuItem;
N1: TMenuItem;
procedure actRecogerPedidosExecute(Sender: TObject); procedure actRecogerPedidosExecute(Sender: TObject);
procedure actConfigurarTiendaExecute(Sender: TObject); procedure actConfigurarTiendaExecute(Sender: TObject);
procedure actActualizarTiendaExecute(Sender: TObject); procedure actActualizarTiendaExecute(Sender: TObject);

View File

@ -1984,10 +1984,12 @@ object srvTiendaWeb: TsrvTiendaWeb
'INSERT'#10' INTO customers'#10' (customers_firstname,'#10' customers' + 'INSERT'#10' INTO customers'#10' (customers_firstname,'#10' customers' +
'_lastname, customers_email_address,'#10' customers_default_addre' + '_lastname, customers_email_address,'#10' customers_default_addre' +
'ss_id, customers_telephone, '#10' customers_fax, customers_passw' + 'ss_id, customers_telephone, '#10' customers_fax, customers_passw' +
'ord,'#10' rdx_customers_id_local)'#10' VALUES'#10' (:customers_first' + 'ord,'#10' rdx_customers_id_local,'#10' customers_gender, custome' +
'name,'#10' :customers_lastname, :customers_email_address,'#10' :' + 'rs_dob)'#10' VALUES'#10' (:customers_firstname,'#10' :customers_last' +
'customers_default_address_id, :customers_telephone, '#10' :custo' + 'name, :customers_email_address,'#10' :customers_default_address_' +
'mers_fax, :customers_password,'#10' :rdx_customers_id_local)' 'id, :customers_telephone, '#10' :customers_fax, :customers_passw' +
'ord,'#10' :rdx_customers_id_local,'#10' '#39' '#39', '#39'0000-00-00 00:00:0' +
'0'#39')'
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>
@ -2744,11 +2746,13 @@ object srvTiendaWeb: TsrvTiendaWeb
Connection = 'MySQL' Connection = 'MySQL'
TargetTable = 'products' TargetTable = 'products'
SQL = SQL =
'INSERT'#10' INTO products'#10' (products_model, products_status,'#10' ' + 'INSERT'#10' INTO products'#10' (products_model, products_status, pro' +
' products_date_added, products_last_modified,'#10' manufacturer' + 'ducts_quantity,'#10' products_price, products_weight, products_t' +
's_id, rdx_products_id_local)'#10' VALUES'#10' (:products_model, :pro' + 'ax_class_id,'#10' products_ordered, products_date_added, product' +
'ducts_status, current_timestamp, null,'#10' :manufacturers_id, :' + 's_last_modified,'#10' manufacturers_id, rdx_products_id_local)'#10' ' +
'rdx_products_id_local)' ' VALUES'#10' (:products_model, :products_status, 0,'#10' 0, 0, 0,' +
#10' 0, current_timestamp, null,'#10' :manufacturers_id, :rdx_p' +
'roducts_id_local)'
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>

View File

@ -50,6 +50,7 @@ type
function GetDatasetDataExOSC(const DatasetName: String; const Params: TDADatasetParamArray; const UserFilter: String; const IncludeSchema: Boolean; function GetDatasetDataExOSC(const DatasetName: String; const Params: TDADatasetParamArray; const UserFilter: String; const IncludeSchema: Boolean;
const MaxRecords: Integer): Binary; const MaxRecords: Integer): Binary;
function UpdateDataOSC(const Delta: Binary): Binary; function UpdateDataOSC(const Delta: Binary): Binary;
function HayConexionConTienda: Boolean;
end; end;
implementation implementation
@ -59,7 +60,7 @@ uses
{Generated:} FactuGES_Invk, uDataModuleServer, schTiendaWebClient_Intf, {Generated:} FactuGES_Invk, uDataModuleServer, schTiendaWebClient_Intf,
uDatabaseUtils, uRestriccionesUsuarioUtils, Dialogs, uBizTiendaWebServer, uDatabaseUtils, uRestriccionesUsuarioUtils, Dialogs, uBizTiendaWebServer,
uBizOscCustomerServer, uBizOscAddressBookServer, uBizOscManufacturerServer, uBizOscCustomerServer, uBizOscAddressBookServer, uBizOscManufacturerServer,
uBizOscProductServer, uUsersManager, uBizOscOrderServer; uBizOscProductServer, uUsersManager, uBizOscOrderServer, uTiendaWebUtils;
procedure Create_srvTiendaWeb(out anInstance : IUnknown); procedure Create_srvTiendaWeb(out anInstance : IUnknown);
begin begin
@ -149,6 +150,13 @@ begin
end; end;
end; end;
function TsrvTiendaWeb.HayConexionConTienda: Boolean;
var
AErrMsg : String;
begin
Result := uTiendaWebUtils.HayConexionConTienda(dmServer.FOSCServer, AErrMsg);
end;
function TsrvTiendaWeb.UpdateDataOSC(const Delta: Binary): Binary; function TsrvTiendaWeb.UpdateDataOSC(const Delta: Binary): Binary;
begin begin
AsignarConexion('MySQL'); AsignarConexion('MySQL');

View File

@ -65,6 +65,7 @@ object fEditorTiendaWeb: TfEditorTiendaWeb
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight, akBottom]
Caption = 'Probar conexi'#243'n con la tienda' Caption = 'Probar conexi'#243'n con la tienda'
TabOrder = 1 TabOrder = 1
Visible = False
DesignSize = ( DesignSize = (
333 333
198) 198)

View File

@ -80,8 +80,9 @@ end;
procedure TfEditorTiendaWeb.actComprobarExecute(Sender: TObject); procedure TfEditorTiendaWeb.actComprobarExecute(Sender: TObject);
begin begin
if FController.HayConexionConTienda(edtBDSERVER.Text, edtBDNAME.Text, { if FController.HayConexionConTienda(edtBDSERVER.Text, edtBDNAME.Text,
edtBDUSER.Text, edtBDPASS.Text) then edtBDUSER.Text, edtBDPASS.Text) then}
if FController.HayConexionConTienda then
ShowInfoMessage('Conexión válida con la tienda') ShowInfoMessage('Conexión válida con la tienda')
else else
ShowErrorMessage('Error de conexión', 'No se ha podido establecer la conexión con la base de datos.'); ShowErrorMessage('Error de conexión', 'No se ha podido establecer la conexión con la base de datos.');

View File

@ -444,6 +444,12 @@
</Parameter> </Parameter>
</Parameters> </Parameters>
</Operation> </Operation>
<Operation Name="HayConexionConTienda" UID="{93CF3B07-2AEC-4A6B-A4D8-4631CC6CA852}">
<Parameters>
<Parameter Name="Result" DataType="Boolean" Flag="Result">
</Parameter>
</Parameters>
</Operation>
</Operations> </Operations>
</Interface> </Interface>
</Interfaces> </Interfaces>

View File

@ -519,6 +519,7 @@ type
function GetDatasetDataExOSC(const DatasetName: String; const Params: TDADatasetParamArray; const UserFilter: String; const IncludeSchema: Boolean; function GetDatasetDataExOSC(const DatasetName: String; const Params: TDADatasetParamArray; const UserFilter: String; const IncludeSchema: Boolean;
const MaxRecords: Integer): Binary; const MaxRecords: Integer): Binary;
function UpdateDataOSC(const Delta: Binary): Binary; function UpdateDataOSC(const Delta: Binary): Binary;
function HayConexionConTienda: Boolean;
end; end;
{ CosrvTiendaWeb } { CosrvTiendaWeb }
@ -537,6 +538,7 @@ type
function GetDatasetDataExOSC(const DatasetName: String; const Params: TDADatasetParamArray; const UserFilter: String; const IncludeSchema: Boolean; function GetDatasetDataExOSC(const DatasetName: String; const Params: TDADatasetParamArray; const UserFilter: String; const IncludeSchema: Boolean;
const MaxRecords: Integer): Binary; const MaxRecords: Integer): Binary;
function UpdateDataOSC(const Delta: Binary): Binary; function UpdateDataOSC(const Delta: Binary): Binary;
function HayConexionConTienda: Boolean;
end; end;
{ IsrvFacturasProveedor } { IsrvFacturasProveedor }
@ -1950,6 +1952,28 @@ begin
end end
end; end;
function TsrvTiendaWeb_Proxy.HayConexionConTienda: Boolean;
var
__request, __response : TMemoryStream;
begin
__request := TMemoryStream.Create;
__response := TMemoryStream.Create;
try
__Message.Initialize(__TransportChannel, 'FactuGES', __InterfaceName, 'HayConexionConTienda');
__Message.Finalize;
__Message.WriteToStream(__request);
__TransportChannel.Dispatch(__request, __response);
__Message.ReadFromStream(__response);
__Message.Read('Result', TypeInfo(Boolean), result, []);
finally
__request.Free;
__response.Free;
end
end;
{ CosrvFacturasProveedor } { CosrvFacturasProveedor }
class function CosrvFacturasProveedor.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFacturasProveedor; class function CosrvFacturasProveedor.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFacturasProveedor;

View File

@ -165,6 +165,7 @@ type
procedure Invoke_GetDatasetSchemaOSC(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_GetDatasetSchemaOSC(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_GetDatasetDataExOSC(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_GetDatasetDataExOSC(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_UpdateDataOSC(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_UpdateDataOSC(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
procedure Invoke_HayConexionConTienda(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end; end;
TsrvFacturasProveedor_Invoker = class(TDARemoteService_Invoker) TsrvFacturasProveedor_Invoker = class(TDARemoteService_Invoker)
@ -1065,6 +1066,22 @@ begin
end; end;
end; end;
procedure TsrvTiendaWeb_Invoker.Invoke_HayConexionConTienda(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function HayConexionConTienda: Boolean; }
var
lResult: Boolean;
begin
try
lResult := (__Instance as IsrvTiendaWeb).HayConexionConTienda;
__Message.Initialize(__Transport, 'FactuGES', 'srvTiendaWeb', 'HayConexionConTiendaResponse');
__Message.Write('Result', TypeInfo(Boolean), lResult, []);
__Message.Finalize;
finally
end;
end;
{ TsrvFacturasProveedor_Invoker } { TsrvFacturasProveedor_Invoker }
procedure TsrvFacturasProveedor_Invoker.Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure TsrvFacturasProveedor_Invoker.Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);

Binary file not shown.

View File

@ -908,9 +908,9 @@
#define IdResourceStrings_RSStatusConnecting 65181 #define IdResourceStrings_RSStatusConnecting 65181
#define IdResourceStrings_RSStatusConnected 65182 #define IdResourceStrings_RSStatusConnected 65182
#define IdResourceStrings_RSStatusDisconnecting 65183 #define IdResourceStrings_RSStatusDisconnecting 65183
#define ComConst_SNoMethod 65184 #define uRODECConst_sFMT_XX 65184
#define ComConst_SVarNotObject 65185 #define uRODECConst_sInvalidKeySize 65185
#define ComConst_STooManyParams 65186 #define uRODECConst_sNotInitialized 65186
#define IdResourceStrings_RSCannotAllocateSocket 65187 #define IdResourceStrings_RSCannotAllocateSocket 65187
#define IdResourceStrings_RSConnectionClosedGracefully 65188 #define IdResourceStrings_RSConnectionClosedGracefully 65188
#define IdResourceStrings_RSCouldNotBindSocket 65189 #define IdResourceStrings_RSCouldNotBindSocket 65189
@ -924,70 +924,70 @@
#define IdResourceStrings_RSNotConnected 65197 #define IdResourceStrings_RSNotConnected 65197
#define IdResourceStrings_RSObjectTypeNotSupported 65198 #define IdResourceStrings_RSObjectTypeNotSupported 65198
#define IdResourceStrings_RSTerminateThreadTimeout 65199 #define IdResourceStrings_RSTerminateThreadTimeout 65199
#define uRORes_err_InvalidHeader 65200 #define uRORes_err_VariantIsNotArray 65200
#define uRORes_err_UnknownClassInStream 65201 #define uRORes_err_InvalidVarArrayDimCount 65201
#define uRORes_err_UnexpectedClassInStream 65202 #define uRORes_err_MessageNotAssigned 65202
#define uRORes_err_SessionNotFound 65203 #define ComConst_SOleError 65203
#define uRORes_err_ChannelDoesntSupportIROMetadataReader 65204 #define ComConst_SNoMethod 65204
#define uRORes_err_TooManySessions 65205 #define ComConst_SVarNotObject 65205
#define uRORes_err_DOMElementIsNIL 65206 #define ComConst_STooManyParams 65206
#define uRORes_err_CannotLoadXMLDocument 65207 #define uRODECConst_sProtectionCircular 65207
#define uRORes_err_ErrorCreatingMsXmlDoc 65208 #define uRODECConst_sStringFormatExists 65208
#define uRORes_err_NoXMLParsersAvailable 65209 #define uRODECConst_sInvalidStringFormat 65209
#define uRORes_err_IDispatchMarshalingNotSupported 65210 #define uRODECConst_sInvalidFormatString 65210
#define uRORes_err_UnsupportedVariantType 65211 #define uRODECConst_sFMT_COPY 65211
#define uRORes_err_VariantIsNotArray 65212 #define uRODECConst_sFMT_HEX 65212
#define uRORes_err_InvalidVarArrayDimCount 65213 #define uRODECConst_sFMT_HEXL 65213
#define uRORes_err_MessageNotAssigned 65214 #define uRODECConst_sFMT_MIME64 65214
#define ComConst_SOleError 65215 #define uRODECConst_sFMT_UU 65215
#define uRORes_err_NILMessage 65216 #define uRORes_err_ServerOnlySupportsOneDispatcher 65216
#define uRORes_err_UnspecifiedInterface 65217 #define uRORes_err_UnhandledException 65217
#define uRORes_err_UnspecifiedMessage 65218 #define uRORes_err_ChannelBusy 65218
#define uRORes_err_UnknownMethod 65219 #define uRORes_err_ArrayIndexOutOfBounds 65219
#define uRORes_err_ClassFactoryDidNotReturnInstance 65220 #define uRORes_err_InvalidHeader 65220
#define uRORes_err_TypeNotSupported 65221 #define uRORes_err_UnknownClassInStream 65221
#define uRORes_err_ClassFactoryNotFound 65222 #define uRORes_err_UnexpectedClassInStream 65222
#define uRORes_err_IROMessageNotSupported 65223 #define uRORes_err_SessionNotFound 65223
#define uRORes_err_ClassAlreadyRegistered 65224 #define uRORes_err_ChannelDoesntSupportIROMetadataReader 65224
#define uRORes_err_UnknownProxyInterface 65225 #define uRORes_err_TooManySessions 65225
#define uRORes_err_DispatcherAlreadyAssigned 65226 #define uRORes_err_DOMElementIsNIL 65226
#define uRORes_err_CannotFindMessageDispatcher 65227 #define uRORes_err_CannotLoadXMLDocument 65227
#define uRORes_err_ServerOnlySupportsOneDispatcher 65228 #define uRORes_err_ErrorCreatingMsXmlDoc 65228
#define uRORes_err_UnhandledException 65229 #define uRORes_err_NoXMLParsersAvailable 65229
#define uRORes_err_ChannelBusy 65230 #define uRORes_err_IDispatchMarshalingNotSupported 65230
#define uRORes_err_ArrayIndexOutOfBounds 65231 #define uRORes_err_UnsupportedVariantType 65231
#define uRORes_err_InvalidStringLength 65232 #define uRORes_str_ExceptionOnServer 65232
#define uRORes_str_InvalidClassTypeInStream 65233 #define uRORes_str_ExceptionReraisedFromServer 65233
#define uRORes_err_UnexpectedEndOfStream 65234 #define uRORes_err_AssignError 65234
#define uRORes_err_RodlDuplicateName 65235 #define uRORes_err_InvalidRequestStream 65235
#define uRORes_err_RodlNoDataTypeSpecified 65236 #define uRORes_err_NILMessage 65236
#define uRORes_err_RodlNoEnumValues 65237 #define uRORes_err_UnspecifiedInterface 65237
#define uRORes_err_RodlNoStructElementsDefined 65238 #define uRORes_err_UnspecifiedMessage 65238
#define uRORes_err_RodlNoOperationsDefined 65239 #define uRORes_err_UnknownMethod 65239
#define uRORes_err_RodlUsedFileDoesNotExist 65240 #define uRORes_err_ClassFactoryDidNotReturnInstance 65240
#define uRORes_err_RodlInvalidDataType 65241 #define uRORes_err_TypeNotSupported 65241
#define uRORes_err_RodlStructCannotBeNested 65242 #define uRORes_err_ClassFactoryNotFound 65242
#define uRORes_err_RodlInvalidAncestorType 65243 #define uRORes_err_IROMessageNotSupported 65243
#define uRORes_str_ExceptionOnServer 65244 #define uRORes_err_ClassAlreadyRegistered 65244
#define uRORes_str_ExceptionReraisedFromServer 65245 #define uRORes_err_UnknownProxyInterface 65245
#define uRORes_err_AssignError 65246 #define uRORes_err_DispatcherAlreadyAssigned 65246
#define uRORes_err_InvalidRequestStream 65247 #define uRORes_err_CannotFindMessageDispatcher 65247
#define uRODECConst_sProtectionCircular 65248 #define uRORes_err_InvalidIndex 65248
#define uRODECConst_sStringFormatExists 65249 #define uRORes_err_InvalidType 65249
#define uRODECConst_sInvalidStringFormat 65250 #define uRORes_err_InvalidStream 65250
#define uRODECConst_sInvalidFormatString 65251 #define uRORes_err_InvalidParamFlag 65251
#define uRODECConst_sFMT_COPY 65252 #define uRORes_err_InvalidStringLength 65252
#define uRODECConst_sFMT_HEX 65253 #define uRORes_str_InvalidClassTypeInStream 65253
#define uRODECConst_sFMT_HEXL 65254 #define uRORes_err_UnexpectedEndOfStream 65254
#define uRODECConst_sFMT_MIME64 65255 #define uRORes_err_RodlDuplicateName 65255
#define uRODECConst_sFMT_UU 65256 #define uRORes_err_RodlNoDataTypeSpecified 65256
#define uRODECConst_sFMT_XX 65257 #define uRORes_err_RodlNoEnumValues 65257
#define uRODECConst_sInvalidKeySize 65258 #define uRORes_err_RodlNoStructElementsDefined 65258
#define uRODECConst_sNotInitialized 65259 #define uRORes_err_RodlNoOperationsDefined 65259
#define uRORes_err_InvalidIndex 65260 #define uRORes_err_RodlUsedFileDoesNotExist 65260
#define uRORes_err_InvalidType 65261 #define uRORes_err_RodlInvalidDataType 65261
#define uRORes_err_InvalidStream 65262 #define uRORes_err_RodlStructCannotBeNested 65262
#define uRORes_err_InvalidParamFlag 65263 #define uRORes_err_RodlInvalidAncestorType 65263
#define Consts_SDockedCtlNeedsName 65264 #define Consts_SDockedCtlNeedsName 65264
#define Consts_SDockTreeRemoveError 65265 #define Consts_SDockTreeRemoveError 65265
#define Consts_SDockZoneNotFound 65266 #define Consts_SDockZoneNotFound 65266
@ -2162,9 +2162,9 @@ BEGIN
IdResourceStrings_RSStatusConnecting, "Connecting to %s." IdResourceStrings_RSStatusConnecting, "Connecting to %s."
IdResourceStrings_RSStatusConnected, "Connected." IdResourceStrings_RSStatusConnected, "Connected."
IdResourceStrings_RSStatusDisconnecting, "Disconnecting." IdResourceStrings_RSStatusDisconnecting, "Disconnecting."
ComConst_SNoMethod, "Method '%s' not supported by automation object" uRODECConst_sFMT_XX, "XX Coding"
ComConst_SVarNotObject, "Variant does not reference an automation object" uRODECConst_sInvalidKeySize, "Length from Encryptionkey is invalid.\r\nKeysize for %s must be to %d-%d bytes"
ComConst_STooManyParams, "Dispatch methods do not support more than 64 parameters" uRODECConst_sNotInitialized, "%s is not initialized call Init() or InitKey() before."
IdResourceStrings_RSCannotAllocateSocket, "Cannot allocate socket." IdResourceStrings_RSCannotAllocateSocket, "Cannot allocate socket."
IdResourceStrings_RSConnectionClosedGracefully, "Connection Closed Gracefully." IdResourceStrings_RSConnectionClosedGracefully, "Connection Closed Gracefully."
IdResourceStrings_RSCouldNotBindSocket, "Could not bind socket. Address and port are already in use." IdResourceStrings_RSCouldNotBindSocket, "Could not bind socket. Address and port are already in use."
@ -2178,6 +2178,26 @@ BEGIN
IdResourceStrings_RSNotConnected, "Not Connected" IdResourceStrings_RSNotConnected, "Not Connected"
IdResourceStrings_RSObjectTypeNotSupported, "Object type not supported." IdResourceStrings_RSObjectTypeNotSupported, "Object type not supported."
IdResourceStrings_RSTerminateThreadTimeout, "Terminate Thread Timeout" IdResourceStrings_RSTerminateThreadTimeout, "Terminate Thread Timeout"
uRORes_err_VariantIsNotArray, "Variant must be Array, but is %d"
uRORes_err_InvalidVarArrayDimCount, "Variant Array DimCount must be 1 but is %d"
uRORes_err_MessageNotAssigned, "Message is NIL"
ComConst_SOleError, "OLE error %.8x"
ComConst_SNoMethod, "Method '%s' not supported by automation object"
ComConst_SVarNotObject, "Variant does not reference an automation object"
ComConst_STooManyParams, "Dispatch methods do not support more than 64 parameters"
uRODECConst_sProtectionCircular, "Circular Protection detected, Protection Object is invalid."
uRODECConst_sStringFormatExists, "String Format \"%d\" not exists."
uRODECConst_sInvalidStringFormat, "Input is not an valid %s Format."
uRODECConst_sInvalidFormatString, "Input can not be convert to %s Format."
uRODECConst_sFMT_COPY, "copy Input to Output"
uRODECConst_sFMT_HEX, "Hexadecimal"
uRODECConst_sFMT_HEXL, "Hexadecimal lowercase"
uRODECConst_sFMT_MIME64, "MIME Base 64"
uRODECConst_sFMT_UU, "UU Coding"
uRORes_err_ServerOnlySupportsOneDispatcher, "%s servers only support one dispatcher"
uRORes_err_UnhandledException, "Unhandled exception"
uRORes_err_ChannelBusy, "Channel is busy. Try again later."
uRORes_err_ArrayIndexOutOfBounds, "Array index out of bounds (%d)."
uRORes_err_InvalidHeader, "Invalid binary header. Either incompatible or not a binary message." uRORes_err_InvalidHeader, "Invalid binary header. Either incompatible or not a binary message."
uRORes_err_UnknownClassInStream, "Unknown class \"%s\" found in stream." uRORes_err_UnknownClassInStream, "Unknown class \"%s\" found in stream."
uRORes_err_UnexpectedClassInStream, "Unexpected class found in stream; class \"%s\" does not descend from \"%s\"." uRORes_err_UnexpectedClassInStream, "Unexpected class found in stream; class \"%s\" does not descend from \"%s\"."
@ -2190,10 +2210,10 @@ BEGIN
uRORes_err_NoXMLParsersAvailable, "MSXML is not installed" uRORes_err_NoXMLParsersAvailable, "MSXML is not installed"
uRORes_err_IDispatchMarshalingNotSupported, "Marshaling of IDispatch (%d) type variants is not supported." uRORes_err_IDispatchMarshalingNotSupported, "Marshaling of IDispatch (%d) type variants is not supported."
uRORes_err_UnsupportedVariantType, "Unsupported variant type \"%d\"" uRORes_err_UnsupportedVariantType, "Unsupported variant type \"%d\""
uRORes_err_VariantIsNotArray, "Variant must be Array, but is %d" uRORes_str_ExceptionOnServer, "An exception of type %s was raised on the server: %s"
uRORes_err_InvalidVarArrayDimCount, "Variant Array DimCount must be 1 but is %d" uRORes_str_ExceptionReraisedFromServer, "An exception was raised on the server: %s"
uRORes_err_MessageNotAssigned, "Message is NIL" uRORes_err_AssignError, "Cannot assign a \"%s\" to a \"%s\"."
ComConst_SOleError, "OLE error %.8x" uRORes_err_InvalidRequestStream, "Invalid request stream (%d bytes)"
uRORes_err_NILMessage, "Message is NIL" uRORes_err_NILMessage, "Message is NIL"
uRORes_err_UnspecifiedInterface, "The message does not have an interface name" uRORes_err_UnspecifiedInterface, "The message does not have an interface name"
uRORes_err_UnspecifiedMessage, "The message does not have a name" uRORes_err_UnspecifiedMessage, "The message does not have a name"
@ -2206,10 +2226,10 @@ BEGIN
uRORes_err_UnknownProxyInterface, "Unknown proxy interface \"%s\"" uRORes_err_UnknownProxyInterface, "Unknown proxy interface \"%s\""
uRORes_err_DispatcherAlreadyAssigned, "Dispatcher for %s already assigned" uRORes_err_DispatcherAlreadyAssigned, "Dispatcher for %s already assigned"
uRORes_err_CannotFindMessageDispatcher, "Cannot find message dispatcher. Maybe there is no message component configured for for the requested path?" uRORes_err_CannotFindMessageDispatcher, "Cannot find message dispatcher. Maybe there is no message component configured for for the requested path?"
uRORes_err_ServerOnlySupportsOneDispatcher, "%s servers only support one dispatcher" uRORes_err_InvalidIndex, "Invalid index %d"
uRORes_err_UnhandledException, "Unhandled exception" uRORes_err_InvalidType, "Invalid type \"%s. Expected \"%s\"\""
uRORes_err_ChannelBusy, "Channel is busy. Try again later." uRORes_err_InvalidStream, "Invalid stream"
uRORes_err_ArrayIndexOutOfBounds, "Array index out of bounds (%d)." uRORes_err_InvalidParamFlag, "Invalid Parameter Flag \"%s\""
uRORes_err_InvalidStringLength, "Stream read error: Invalid string length \"%d\"" uRORes_err_InvalidStringLength, "Stream read error: Invalid string length \"%d\""
uRORes_str_InvalidClassTypeInStream, "Stream read error: Invalid class type encountered: \"%s\"" uRORes_str_InvalidClassTypeInStream, "Stream read error: Invalid class type encountered: \"%s\""
uRORes_err_UnexpectedEndOfStream, "Unexpected end of stream." uRORes_err_UnexpectedEndOfStream, "Unexpected end of stream."
@ -2222,26 +2242,6 @@ BEGIN
uRORes_err_RodlInvalidDataType, "Invalid or undefined data type \"%s\"." uRORes_err_RodlInvalidDataType, "Invalid or undefined data type \"%s\"."
uRORes_err_RodlStructCannotBeNested, "Structs cannot recursively contain themselves." uRORes_err_RodlStructCannotBeNested, "Structs cannot recursively contain themselves."
uRORes_err_RodlInvalidAncestorType, "Invalid or undefined ancestor type \"%s\"." uRORes_err_RodlInvalidAncestorType, "Invalid or undefined ancestor type \"%s\"."
uRORes_str_ExceptionOnServer, "An exception of type %s was raised on the server: %s"
uRORes_str_ExceptionReraisedFromServer, "An exception was raised on the server: %s"
uRORes_err_AssignError, "Cannot assign a \"%s\" to a \"%s\"."
uRORes_err_InvalidRequestStream, "Invalid request stream (%d bytes)"
uRODECConst_sProtectionCircular, "Circular Protection detected, Protection Object is invalid."
uRODECConst_sStringFormatExists, "String Format \"%d\" not exists."
uRODECConst_sInvalidStringFormat, "Input is not an valid %s Format."
uRODECConst_sInvalidFormatString, "Input can not be convert to %s Format."
uRODECConst_sFMT_COPY, "copy Input to Output"
uRODECConst_sFMT_HEX, "Hexadecimal"
uRODECConst_sFMT_HEXL, "Hexadecimal lowercase"
uRODECConst_sFMT_MIME64, "MIME Base 64"
uRODECConst_sFMT_UU, "UU Coding"
uRODECConst_sFMT_XX, "XX Coding"
uRODECConst_sInvalidKeySize, "Length from Encryptionkey is invalid.\r\nKeysize for %s must be to %d-%d bytes"
uRODECConst_sNotInitialized, "%s is not initialized call Init() or InitKey() before."
uRORes_err_InvalidIndex, "Invalid index %d"
uRORes_err_InvalidType, "Invalid type \"%s. Expected \"%s\"\""
uRORes_err_InvalidStream, "Invalid stream"
uRORes_err_InvalidParamFlag, "Invalid Parameter Flag \"%s\""
Consts_SDockedCtlNeedsName, "Docked control must have a name" Consts_SDockedCtlNeedsName, "Docked control must have a name"
Consts_SDockTreeRemoveError, "Error removing control from dock tree" Consts_SDockTreeRemoveError, "Error removing control from dock tree"
Consts_SDockZoneNotFound, " - Dock zone not found" Consts_SDockZoneNotFound, " - Dock zone not found"

View File

@ -16,7 +16,7 @@ BEGIN
VALUE "FileVersion", "3.0.0.0\0" VALUE "FileVersion", "3.0.0.0\0"
VALUE "ProductName", "FactuGES Server\0" VALUE "ProductName", "FactuGES Server\0"
VALUE "ProductVersion", "3.0.0.0\0" VALUE "ProductVersion", "3.0.0.0\0"
VALUE "CompileDate", "miércoles, 11 de junio de 2008 11:40\0" VALUE "CompileDate", "lunes, 16 de junio de 2008 18:29\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -39,7 +39,6 @@ var
i : integer; i : integer;
Separador : String; Separador : String;
bHayAgrupacion : Boolean; bHayAgrupacion : Boolean;
APos : Integer;
function GetTrueFieldName(AField : string; ConAlias : Boolean = True) : String; function GetTrueFieldName(AField : string; ConAlias : Boolean = True) : String;
var var
@ -131,7 +130,6 @@ function TReplicarDataSet.GetNewDataSet: IDADataset;
var var
SQL: String; SQL: String;
ASchemaDataSet: TDADataSet; ASchemaDataSet: TDADataSet;
AField: TDAField;
AColumnList : TStringList; AColumnList : TStringList;
i, j : Integer; i, j : Integer;
begin begin

View File

@ -2,7 +2,7 @@ unit uTiendaWebUtils;
interface interface
function TratarCadena (Cadena: String): String; //function TratarCadena (Cadena: String): String;
function HayConexionConTienda(const AODBCName : String; var AErrorMsg: String): Boolean; function HayConexionConTienda(const AODBCName : String; var AErrorMsg: String): Boolean;
@ -23,7 +23,7 @@ begin
Name := 'ADOConnection1'; Name := 'ADOConnection1';
Provider := 'MSDASQL.1'; Provider := 'MSDASQL.1';
LoginPrompt := False; LoginPrompt := False;
ConnectionString := 'Provider=MSDASQL.1;Persist Security Info=False;' + ConnectionString := 'Provider=MSDASQL.1;Persist Security Info=False;CHARSET=utf8;' +
'Data Source=' + AODBCName; 'Data Source=' + AODBCName;
try try
@ -43,9 +43,9 @@ begin
end; end;
end; end;
function TratarCadena (Cadena: String): String; {function TratarCadena (Cadena: String): String;
begin begin
Result := StringReplace(Cadena, '''', '\\''', []); Result := StringReplace(Cadena, '''', '\\''', []);
end; end;}
end. end.

View File

@ -21,7 +21,7 @@ implementation
{$R *.dfm} {$R *.dfm}
uses JclFileUtils; uses JclFileUtils, uDAInterfaces;
procedure TfAcercaDe.FormShow(Sender: TObject); procedure TfAcercaDe.FormShow(Sender: TObject);
var var

View File

@ -48,8 +48,8 @@ object dmServer: TdmServer
item item
Name = 'MySQL' Name = 'MySQL'
ConnectionString = ConnectionString =
'ADO?AuxDriver=MSDASQL.1;Server=OSCommerce Desarrollo;UserID=root' + 'ADO?AuxDriver=MSDASQL.1;Server="OSCommerce Desarrollo";useUnicod' +
';Password=;Option=3;' 'e=True;characterEncoding=latin1_spanish_ci;'
Default = False Default = False
Tag = 0 Tag = 0
end end

View File

@ -268,7 +268,7 @@ begin
ConnectionManager.Connections.GetDefaultConnection.ConnectionString := GetConnectionString; ConnectionManager.Connections.GetDefaultConnection.ConnectionString := GetConnectionString;
with ConnectionManager.Connections.ConnectionByName('MySQL') do with ConnectionManager.Connections.ConnectionByName('MySQL') do
ConnectionString := 'ADO?AuxDriver=MSDASQL.1;Server=' + FOSCServer + ';useUnicode=True;characterEncoding=UTF_8'; ConnectionString := 'ADO?AuxDriver=MSDASQL.1;Server=' + FOSCServer + ';useUnicode=True;characterEncoding=latin1_spanish_ci;';
ShowBalloonHint('Conectado a ' + ConnectionName, biInfo); ShowBalloonHint('Conectado a ' + ConnectionName, biInfo);

View File

@ -74,7 +74,7 @@ begin
for i := 0 to dmServer.ConnectionManager.Connections.Count - 1 do for i := 0 to dmServer.ConnectionManager.Connections.Count - 1 do
Memo1.Lines.Add(dmServer.ConnectionManager.Connections[i].Name + ' -> ' + dmServer.ConnectionManager.Connections[i].ConnectionString); Memo1.Lines.Add(dmServer.ConnectionManager.Connections[i].Name + ' -> ' + dmServer.ConnectionManager.Connections[i].ConnectionString);
end; end;
// JvTrayIcon.HideApplication; JvTrayIcon.HideApplication;
end; end;
procedure TfServerForm.actRestartExecute(Sender: TObject); procedure TfServerForm.actRestartExecute(Sender: TObject);