DbType

  • Thread starter Thread starter Peter Kirk
  • Start date Start date
P

Peter Kirk

Hi

I have a database with an "nchar" column. How do I specify this type of
column in C# when I use stored procedures?

For example:

IDbCommand command = ... // get the command

IDataParameter param = command.CreateParameter();

param.ParameterName = "@pcid";
param.Value = 'n';
param.Direction = ParameterDirection.Input;

param.DbType = ??

command.Parameters.Add(param);

There appears to be no DbType whihc corresponds to a char.

Thanks,
Peter
 

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

Back
Top