C# QueryDef Parameters With DataType

C

Corby Nichols

I am calling DAO from C# to create a QueryDef that has parameters. I have
seen some examples where the parameters show up similiar to a SQL Strored
Procedure such as:
Parameters:
@MemerID int;
@FirstName string; (Or something similiar to this)

But when I create parameters using db.CreateQueryDef(queryName, queryText);

The parameters show up in Access (in View SQL Mode) as below:

INSERT INTO Databases ( AuthenticationType, ConnectionString, DatabaseName,
DatabaseType, DBPassword, Exclude, Path, ProjectID, Serializable, ServerName,
UserID )
SELECT @AuthenticationType AS Expr1, @ConnectionString AS Expr2,
@DatabaseName AS Expr3, @DatabaseType AS Expr4, @DBPassword AS Expr5,
@Exclude AS Expr6, @Path AS Expr7, @ProjectID AS Expr8, @Serializable AS
Expr9, @ServerName AS Expr10, @UserID AS Expr11;

Is there a way to control the datatypes for the parameters?

Thank you,

Corby Nichols
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top