<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>11 May 2020 16:27:40 Z</lastBuildDate><pubDate>11 May 2020 16:27:40 Z</pubDate><description>Hi all,&#13;
anyone has experiences with Dot Net Providers with Windev to connect to database systems?&#13;
I'm trying to use .net and I can read and write data but when I use parameters in my sql query I always get "ambiguous match found" dot net error!&#13;
I tried to change a little bit of everything but I don't understand what the problem is.&#13;
I'm using .net FirebirdSQL provider in this example, but I tried with Postgres and AS400 on WD24 and WD25, with the same results.&#13;
ADO documentation on parameters seems to be simple but I don't know if in Windev I have to do something more...&#13;
If anyone can help me out, it would be really appreciated :)&#13;
&#13;
Tnx, Andrea&#13;
&#13;
I post my test code:&#13;
&#13;
If bUseParameter=false all is OK&#13;
If bUseParameter=true I get the error&#13;
	// Failure reading &lt;Parameters&gt; control of &lt;FbCommand&gt; type&#13;
	// Error returned by .NET Framework: &#13;
	// ambiguous match found&#13;
&#13;
&#13;
PROCEDURE TestDotNetProvider(bUseParameter is boolean)&#13;
&#13;
clConnStr is FbConnectionStringBuilder&#13;
&#13;
clConnStr.DataSource="192.168.1.1"&#13;
clConnStr.Database="C:\Db\MyDb.fdb"&#13;
clConnStr.UserID="sysdba"&#13;
clConnStr.Password="masterkey"&#13;
&#13;
clMyconn is FbConnection&#13;
&#13;
clMyconn.ConnectionString=clConnStr.ToString()&#13;
&#13;
clMyconn.Open()&#13;
&#13;
clSql is FbCommand&#13;
&#13;
clSql&lt;-clMyconn.CreateCommand()&#13;
&#13;
clSql.CommandType=System.Data.CommandType.Text&#13;
&#13;
IF bUseParameter THEN&#13;
	// Here the error&#13;
	clSql.Parameters.Clear()&#13;
&#13;
	// Failure reading &lt;Parameters&gt; control of &lt;FbCommand&gt; type&#13;
	// Error returned by .NET Framework: &#13;
	// ambiguous match found&#13;
&#13;
	clSql.CommandText="SELECT * FROM mytable WHERE mykey=:mykeyvalue"&#13;
	&#13;
	pclParam is FbParameter&#13;
	&#13;
	pclParam&lt;-clSql.CreateParameter()&#13;
	&#13;
	pclParam.ParameterName=":mykeyvalue"&#13;
	pclParam.Value="somevalue"&#13;
	&#13;
	// Here the error&#13;
	clSql.Parameters.Add(pclParam)&#13;
&#13;
	// Failure reading &lt;Parameters&gt; control of &lt;FbCommand&gt; type&#13;
	// Error returned by .NET Framework: &#13;
	// ambiguous match found&#13;
ELSE&#13;
	clSql.CommandText="SELECT * FROM mytable WHERE mykey='somevalue'"&#13;
END&#13;
&#13;
pclDati is FbDataReader dynamic&#13;
&#13;
pclDati&lt;-clSql.ExecuteReader()&#13;
&#13;
Trace("Number of fields: "+pclDati.FieldCount)&#13;
&#13;
sFieldName, sFieldType is string&#13;
vFieldValue is Variant&#13;
&#13;
WHILE pclDati.Read()&#13;
	FOR i=0 _TO_ pclDati.FieldCount-1&#13;
		sFieldName=pclDati.GetName(i)&#13;
		sFieldType=pclDati.GetDataTypeName(i)&#13;
&#13;
		IF pclDati.IsDBNull(i) THEN&#13;
			vFieldValue=""&#13;
		ELSE&#13;
			vFieldValue=pclDati.GetValue(i)&#13;
		END&#13;
&#13;
		Trace(pclDati.GetName(i)+": Type:"+pclDati.GetDataTypeName(i)+" - Value: "+vFieldValue)&#13;
	END&#13;
END&#13;
&#13;
clMyconn.Close()</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/67820-dot-net-provider/read.awp</link><title>Dot Net Provider</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster></channel></rss>
