hello all,
I have a form to insert the records of patient in database.
i wrote code for this as
Dim objcmd1 as new OleDbCommand("insert into PatientDetail values(@PatId,@PatName,@ContactNo,@Addr,@Age,@Gender)",conn)
objcmd1.Parameters.Add("@PatName",txtname.text)
objcmd1.Parameters.Add("@PatId",txtid.text)
where,conn is the OleDbConnection object.
so,what should i do??
can u plz provide me a better solution for this??

Hi,

Is it necessary '@' symbol in

objcmd1.Parameters.Add("@PatName",txtname.text)
objcmd1.Parameters.Add("@PatId",txtid.text)

?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.