>>>Protected Sub FormView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView1.DataBound
>>> SqlDataSource1.UpdateCommand = "Public gcEmployee" + Chr(13) + Chr(10) + "gcEmployee = 'Viv'" + Chr(13) + Chr(10) + SqlDataSource1.UpdateCommand
>>>End Sub
>>>
>>>
>>>But this didn't work. Perhaps the placement of the code is wrong. Any more insights?
>>
>>Instead of trying to change UpdateCommand in code, can you just place this code there when you configure DataSource or in ASPX code ?
>
>That would equate to something like this
>UpdateCommand="Public employee" + Chr(13) + Chr(10) + "employee = [Viv]" + "UPDATE rtp_projects SET rtp_id = ?, tip_id = ?, lead = ?, st_name = ?, termini = ?, project = ?, length = ?, detail_des = ?, category = ?, system = ?, subsystem = ?, existlanes = ?, newlanes = ?, est_start = ?, est_finish = ?, newbikelan = ?, multiuse = ?, newwalks = ?, study = ?, design = ?, rw = ?, const = ?, operations = ?, total_cost = ? WHERE keyid = ? ">
>
in the SqlDatasource definition. The syntax checker takes exception to the portion [+ chr(10)].
>Do you know of a way to get a hook to the SqlDatasource connection?
What exactly do you mean or want here?
Try my suggestion in the meantime. Put your update command (with public stuff) directly in ASPX file.
If it's not broken, fix it until it is.
My Blog