MySQL Forums
Forum List  »  Other Migration

mysql & power Builder 7.0
Posted by: hugo orozco
Date: January 20, 2005 07:20AM

Hola espero me puedan ayudar, trabajo con ODBC 3.51.10 de mysql ,"mysql 4.1.7-nt" y PowerBuilder7.0, tengo las siguientes tablas:

CREATE TABLE cliente(id_cliente INT NOT NULL,nombre VARCHAR(30),PRIMARY KEY (id_cliente)) TYPE = INNODB;
CREATE TABLE venta(id_factura INT NOT NULL,id_cliente INT NOT NULL,cantidad INT,PRIMARY KEY(id_factura),INDEX (id_cliente),FOREIGN KEY (id_cliente) REFERENCES cliente(id_cliente)) TYPE = INNODB;

Creo un dw con la tabla: venta y uso la condicion: WHERE venta.id_cliente = :CLIENTE >> donde CLIENTE es un argumento tipo Number del dw. Al recuperar los datos recupera bien si el codigo del cliente esta entre 1 a 9, pero a partir del cliente 10 no recupera los datos relacionados con las ventas. Si borro la clave foranea y el indice: 'id_cliente', trabaja bien y recupera todos datos, incluso de clientes con codigo 10 en adelante. En el ODBC tengo seleccionado en la pestaƱa Advanced: la primera opcion de Flags1, tambien la segunda y sexta de Flags3, alguien puede indicarme porque se comporta asi. Que solucion aplicar sin tener que borrar la clave foranea.Gracias

Options: ReplyQuote


Subject
Views
Written By
Posted
mysql & power Builder 7.0
7647
January 20, 2005 07:20AM
2954
February 20, 2005 10:06AM
2689
June 27, 2005 04:19AM
2938
September 15, 2005 07:07PM
2774
October 26, 2005 10:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.