Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Jhonz Khan
Starting Member
2 Posts |
Posted - 2013-07-04 : 06:11:26
|
i have got the following error while inserting data into a table:-----------------------------------The name "Farhad" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.-----------------------------------while for this insertion i have used the following Query-----------------------------------Dim Pqury4 As String = " INSERT INTO tbl_TempAppointmen (SNo,pID,docID,appID,Name_ptnt,DocName,Disease) VALUES ('" & SerialNo & "','" & MaxPID & "'," & cmbDocName.SelectedValue & ",'" & MaxAppID & "', " & PatntMane & "," & cmbDocName.Text & "," & deases & ")"-----------------------------------Jhonz |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-04 : 07:18:44
|
[code]Dim Pqury4 As String = " INSERT INTO tbl_TempAppointmen (SNo,pID,docID,appID,Name_ptnt,DocName,Disease) VALUES ('" & SerialNo & "','" & MaxPID & "','" & cmbDocName.SelectedValue & "','" & MaxAppID & "', '" & PatntMane & "','" & cmbDocName.Text & "','" & deases & "')"[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
Jhonz Khan
Starting Member
2 Posts |
Posted - 2013-07-05 : 07:56:53
|
Dear visakh16!i got your given links but it is out of the range of my question if you have an actual answer for my question then please help me?????Jhonz |
|
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-07-05 : 08:51:39
|
Ignore the links - that is just his signature line. What he posted IS an actual answer. Copy his code and use that to replace the statement in your code and run it. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-07-07 : 10:05:43
|
quote: Originally posted by Jhonz Khan Dear visakh16!i got your given links but it is out of the range of my question if you have an actual answer for my question then please help me?????Jhonz
Did you try the query at all?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|
|
|