-
how to edit recordset through ADO
now i can export data to excel through ado technical,just like below
part = "555"
cnt.Open "dsn=ccc", "123", "123"
STRSQL1 = "SELECT PST_CompItemID "
STRSQL2 = "FROM dbo.PST PST "
STRSQL3 = "WHERE PST_CompItemID = '" & part & "'"
rststring = STRSQL1 & STRSQL2 & STRSQL3
rst.Open rststring, cnt
but now actually i want to set
rst.Fields("PST_RoutSeqID").Value = "35036"
if the part 555 is found in this sheet,
but for me is difficult to write code to execute this action,who can help me to solve it
the function is
open the dbo pst pst and if pst_compitemid equal "555" then set pst_routseqid =35036
any suggestion is appreciated
helai
-
Are you wanting to write that value back to the data source, or just amend it for later use in your code?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules