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.

 All Forums
 Development Tools
 ASP.NET
 VBDatagrid

Author  Topic 

Alkemac
Starting Member

1 Post

Posted - 2002-08-13 : 07:53:58
Hi,

I'm moving my backend database from Access 2000 to SQL Svr 2000. My application uses a datagrid to allow me to change information directly in the table.

However, all the allowaddnew, allowdelete, allowupdate are set to true, but try as I might, I cannot make the changes in the table that I need to. (I've added the code to make it easier to explain)


Private Sub Form_Load()
Set Db = Nothing
ConnectionString = "driver={SQL Server};" & _
"server=File;" & _
"uid=;pwd=;" & _
"database=Cash Management;"
MsgBox "Connection string setup new ver"

With Db
.ConnectionString = ConnectionString
.ConnectionTimeout = 20
.Open
End With
SQLTest.Open "Select * from Test", Db, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = SQLTest
DataGrid1.AllowAddNew = True
DataGrid1.AllowArrows = True
DataGrid1.AllowDelete = True
DataGrid1.AllowUpdate = True
DataGrid1.WrapCellPointer = True
DataGrid1.TabAction = dbgGridNavigation

End Sub


JustinBigelow
SQL Gigolo

1157 Posts

Posted - 2002-08-13 : 09:04:31
What are you binding the grid to a data adapter or data reader? Also what does your event handler look like for the update method.

Justin

Have you hugged your SQL Server today?
Go to Top of Page

joldham
Wiseass Yak Posting Master

300 Posts

Posted - 2002-08-13 : 09:25:03
Also, you might check to make sure the user you are connecting to the database with has permissions to insert, update and delete on the Test table.

Jeremy

Go to Top of Page
   

- Advertisement -