Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Dim MyCn As New ADODB.Connection
  2. MyCn.Provider = "Microsoft.SQLSERVER.CE.OLEDB.3.5"
  3. MyCn.ConnectionString = My.Settings.LocalConnectionString
  4. MyCn.Open()
  5.  
  6. Dim rSelect As New ADODB.Recordset
  7.  
  8. With rSelect
  9. .Open("Select wID, DirPath, Children From Watches Where DirPath like '" & dialog.SelectedPath & "'", MyCn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly)
  10. If .EOF Then
  11. .AddNew()
  12. .Fields!DirPath.Value = dialog.SelectedPath
  13. .Fields!Children.Value = True
  14. .Update()
  15. End If
  16. .Close()
  17. End With
  18.  
  19. In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement