I'm currently using Farpoint's Spread 3 control, which displays spreadsheets based on queries, allowing you to more easily navigate the data, export to excel, and of course update and delete as necessary.
My problem, however, is understanding how to delete the row which the user selects in the spreadsheet. In a test project, my code looks like this when the 'Delete' command button is clicked:
===========================
Private Sub cmdDelete_Click()
Dim strCnn As New ADODB.Connection
Dim Cnn1
Dim rsTop As ADODB.Recordset
Set cmd = New ADODB.Command
'Open ADO Connection
'See Globals
strCnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MER191DB_TEST;Data Source=WBIHO-78HFDMB"
Set Cnn1 = New ADODB.Connection
Cnn1.Open strCnn
'Defines recordset for top-most portion of form
Set rsTop = New ADODB.Recordset
rsTop.Open "Bond", Cnn1, adOpenKeyset, adLockOptimistic, adCmdTable
Set cmd.ActiveConnection = Cnn1
cmd.CommandText = "DELETE FROM Bond WHERE Bond_number=' & Form1.fpSpread1.RowSel1 & '"
'Loop through rsTop recordset and populate corresponding text, check, and combo boxes
With rsTop
'Delete a row in the spreadsheet
Form1.fpSpread1.Action = SS_ACTION_DELETE_ROW
cmd.Execute
End With
End Sub
=============================
It is intended to clear the row from the current spreadsheet, while at the same time removing the respective row from the database, however I cannot figure out how to correctly link the selected row to the data in the table being deleted.
Hi!
i have i problem in far point spread.
i dont think that there is a property call selbold which will apply bold only for selected charecters & this is there in Rich text box.
i want the same provision in far point spread 3.
is there any way where i can apply bold only for selected charecters through code.
pls help me in this regard.
its very very urgent.
sethu_r123, do not post your questions to somebody elses thread unless:
1) the thread is currently active (which very clearly does not apply here - the last post was June 2001). Otherwise you send 'spam' notification to everyone who has subscribed to the thread.
and
2) you question is almost exactly the same as the original question (which clearly does not apply here, the only similarity is the control being used). Otherwise people who help will have to read (and probably spend time thinking about) extra posts that are not relevant to your question.
To stop those issues getting any worse, this thread is now closed - if you want help with your question, post it as a new thread (in the VB6 forum, because it has nothing to do with databases).