Importing from MS Access

I have relized a metod for importing data from ms access database and it work fine under developper but it diden’t work on client and it don’t produce a error code. I have tried different type or connecttion (odbc or directlly) but nothing. Where is the mistake.

How does your method look like? What error are you getting? What do you mean with ‘directly’?

This is the method i wote:

var query = “SELECT commesse.codice, commesse.CodCli, commesse.datacomm, commesse.nprev, commesse.ordine, commesse.dataOrd, commesse.resp, commesse.codlav, commesse.lavoro, commesse.descr, commesse.FtoB, commesse.FtoA, commesse.Dorso, commesse.FtoApB, commesse.FtoApA, commesse.qta, commesse.Consegna, commesse.tassativa, commesse.TelContCli, commesse.ContCli, commesse.CodAge, clienti.descrizione FROM commesse INNER JOIN clienti ON commesse.CodCli = clienti.codice WHERE (commesse.codice >= '”+ globals.dacom + “’ and commesse.codice <= '”+ globals.acom +“') ORDER BY commesse.codice” ;
var maxReturnedRows = 100;
var server = “edigit”;
var dataset = databaseManager.getDataSetByQuery(server, query, null, maxReturnedRows);

for( var i = 1 ; i <= dataset.getMaxRowIndex() ; i++ )

{ dataset.rowIndex = i;

//this sets the current working row in the dataset

controller.newRecord();
codice = dataset.codice;
codcli = dataset.codcli;

datacomm = dataset.datacomm;
nprev = dataset.nprev;
ordine = dataset.ordine;
dataord = dataset.dataord;
resp = dataset.resp;
codlav = dataset.codlav;
lavoro = dataset.lavoro;
descr = dataset.descr;
ftob = dataset.ftob;
ftoa= dataset.ftoa;
dorso = dataset.dorso;
ftoapb = dataset.ftoapb;
ftoapa = dataset.ftoapa;
qta = dataset.qta;
consegna = dataset.consegna;
tassativa = dataset.tassativa;
telcontcli = dataset.telcontcli;
contcli = dataset.contcli;
codage = dataset.codage;
ragionesociale = dataset.descrizione;

}

“directly” I udestood in this way:
jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=z:\ut\c_base.mdb;PWD=password",“user”,“password”);

thanks for your reply!!

Your code looks ok. I did a test here with MS Access and it works perfect with Servoy 1.2RC2. What error do you get?

Also with me it is ok on servoy developper but with servoy client it don’t work and it don’t produce any error code.

Tanks!!

I wonder is it your intention to duplicate records? or a way to show data from a innerjoin? if the later is the case you migth try the controller.loadRecords(pkdataset) (see manual for details on this)