Reputation: 119
I have been having some odd things happen with a form I created. The Form connects to four tables in a database. One of the tables is pulled in in grid view. All the tables can be updated from the fields on the form.
I have been having trouble updating the table from the grid it will intermittently update. So I tried to update using the code below and received the message in the title.
Has any one come across anything like this?
cmdBuilder = New SqlCommandBuilder(adapter)
adapter.Update(ds.Tables(0))
Upvotes: 1
Views: 1186
Reputation: 476
Try changing the connection string as following: Persist Security Info=True;Data Source=MYSERVER\MYINSTANCE;Initial Catalog=MyCatalog;User ID=MyUserID;Password=MyPassword
Taken from MSDN Library The Persist Security Info property specifies whether the data source can persist sensitive authentication information such as a password.+
Security Note: The default setting for the Persist Security Info keyword is false. Setting it to true or yes allows security-sensitive information, including the user ID and password, to be obtained from the connection after the connection has been opened. Keep PersistSecurity Info set to false to ensure that an untrusted source does not have access to sensitive connection string information.
Upvotes: 1