Hi, I have a big question for you. This is my code to query a store procedure on Sql Server 2005
var custid = XDocument.DOM.selectSingleNode("/dfs:myFields/my:NewCase/my:LastCustID").text;
var plantid = XDocument.DOM.selectSingleNode("/dfs:myFields/my:NewCase/my:LastPlantID").text;
var machineid = XDocument.DOM.selectSingleNode("/dfs:myFields/my:NewCase/my:LastMachineID").text;
var richi = XDocument.DOM.selectSingleNode("/dfs:myFields/my:NewCase/my:Richiedente").text;
var telrichi = XDocument.DOM.selectSingleNode("/dfs:myFields/my:NewCase/my:TelRichiedente").text;
var contratto = XDocument.DOM.selectSingleNode("/dfs:myFields/my:NewCase/my:contratto").text;
var scadenza = XDocument.DOM.selectSingleNode("/dfs:myFields/my:NewCase/my:ScadenzaContratto").text;
XDocument.QueryAdapter.Command = 'execute "dbo"."aggiorna_contattiD "' + custid + ", " + plantid + ", "+ machineid + ", '"+ richi + "', '"+ telrichi + "', '"+ contratto + "', '"+ scadenza + "'";
XDocument.Query();
the FIRST time that I submit the form there's not problem. But when I open the form the second time and I try againt to submit I have this error: "Error Convenrting Datatype nvarchar to int". Why? The second submit it is not the same like the first? Thank you