![]() |
|
|
|
#1 |
|
hi friends.....
i'm using the following code to save an image to SQLSERVER2005using asp.net. i got the error message Must declare the scalar variable "@Product_ID". while running the code . please help me.. its urgent cn = New System.Data.OleDb.OleDbConnection(" Provider=SQLOLEDB;SERVER=SERVER\SQLEXPRESS;UID=sa; PASSWORD=kadavan2486;DATABASE=Hard1;Persist Security Info=True;") cn.Open() cm.Connection = cn cm.Parameters.Clear() cm.Parameters.Add("@Product_ID", OleDbType.BigInt, 4) cm.Parameters.Add("@Img", OleDbType.VarBinary, img.Length) cm.Parameters("@Product_ID").Value = 1 cm.Parameters("@Img").Value = img cm.CommandText = "insert into Product_Small_Image(Product_ID,Img) values(@Product_ID ,@Img)" cm.ExecuteNonQuery() cn.Close() iquad |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing value with out using variable in query string in PHP! | Ali_ggl | General Help Related Topics | 0 | 11-29-2008 12:22 PM |
| How to set another machine's environment variable? | vinay.babu | Software | 0 | 10-16-2008 12:54 PM |
| Variable scope | toller | Hardware | 1 | 04-21-2008 08:28 PM |
| Variable Scope in asp.Net | jansi_rk | Software | 1 | 09-18-2006 06:05 PM |
| What's available in variable speed VCR's ? | E. Matthews | DVD Video | 3 | 10-20-2005 11:44 AM |