I'm a vb.net coder and have written a project that now needs to be accessible online, so i'm working on converting it over to asp.net for web access.
Theres a section of my application that allows the user to filter a record, then append "additional notes" to an field in an existing record
I have an Accessdatasource bound to my access databasefile, and a FormView containing readonly fields which contain the information of the record filtered. then outside of the formview i have a multiline textbox (txtAdditional) and a Save button
The filter works, it displays the record by using the AccessDatasource1.FilterExpression
In my cmdSave button's click even i have:
Dim PatientID = ?????? Dim query As String = "UPDATE Enquiry Set Actiontaken='" & txtAdditionalNotes.Text & "' WHERE PatientID="& PatientID AccessDataSource1.InsertCommand = query AccessDataSource1.Insert()
Initially attempting to simply update (overwrite) the field of the currently filtered record.
PatientID is the record Index field in my database, unique and auto-incrementing - so my question is, how i can get this value into a variable so I can use it in my UPDATE query?
In the vb.net(winforms) version of my application i use the datagridview.selectedrows method of retrieving the PatientID of the selected record. is there a similar way i can achieve this with AccessDatasource1?
Please keep in mind i'm totally new (as in less than 48 hours lol) to asp.net but fairly competent with vb.net
Thanks in advance