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 |
|
leelu123
Starting Member
10 Posts |
Posted - 2006-02-03 : 14:01:40
|
| Hi,I am not able to modify(add rows into) a table present in sql server from my vb.net application. I am using sql server 2005 enterprise edition and vs.net 2003. are they compatible?thanks for your help.. |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-02-03 : 14:16:53
|
| Yes, they are compatible.What error are you getting, maybe you should paste some sample code |
 |
|
|
druer
Constraint Violating Yak Guru
314 Posts |
Posted - 2006-02-03 : 14:25:21
|
| It might be a "privelages" issue where the user id you are using has permissions to read the data but not insert new data. You could turn on the SQL Profiler and trace the activity from your PC so that you can capture the exact sql commands with all data from variables filled in so that you can then take that command to a Query Analyzer window and paste it to see if there is an error that you are missing by reading the command in code. |
 |
|
|
leelu123
Starting Member
10 Posts |
Posted - 2006-02-03 : 15:38:23
|
| when I execute my vb.net app, I have added couple rows but couldn't see them in the database tablehere is the code...Dim con As New SqlConnection ("userid=sa;password=;server=ASM\AJA;database=product_01") Dim da As New SqlDataAdapter("select * from products", con) Dim c As SqlCommandBuilder Dim ds As New DataSet da.MissingSchemaAction = MissingSchemaAction.AddWithKey c = New SqlCommandBuilder(da) da.Fill(ds, "products") DataGrid1.DataSource = ds.Tables("products") da.Update(ds, "products")thanks.. |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-02-03 : 15:58:02
|
| Yeah, what error are you getting ? |
 |
|
|
leelu123
Starting Member
10 Posts |
Posted - 2006-02-03 : 16:08:47
|
| I have added couple rows to the datagrid but they are not updated in the databse. I am not getting any error.. whatever operations i am doing on the datagrid, they are not reflected in the database...pl refer to the code above... |
 |
|
|
|
|
|