Link to home
Start Free TrialLog in
Avatar of dizzycat
dizzycat

asked on

SQLite parameters

Hi experts

Can someone show me how to write an sqlite parameter, here is the sql parameter i need to change to accept an sqlite patameter.

comm.Parameters.Add("@Name", System.Data.SqlDbType.NVarChar)
comm.Parameters("@Name").Value = txtName.Text

Hope somebody can help.
Avatar of kaufmed
kaufmed
Flag of United States of America image

It should be the same. Are you receiving an error?
Avatar of dizzycat
dizzycat

ASKER

Yes, it says there is a problem with the parameters
, I just thought that the sqlite parameters were
Different
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I usually let .NET figure out the DB type, unless there is some problem where it can't. Does this work better?
comm.Parameters.Add(new SQLiteParameter("@Name", txtName.Text))

Open in new window

That's great, thankyou.