Hi,

Thanks Tim and Bob.

I ended up with this function:

Sub tUB(BYREF theUpdate,theField,theName)
Dim s
   If IsNumeric(theField) Then
      If theField Then
         s = theName & "=" & CStr(theField)
      Else
         s = ""
      End If
   Else
      If theField <> "" Then
         s = theName & "=""" & theField & """"
      Else
         s = ""
      End If
   End If
   If s <> "" Then
      If theUpdate <> "" Then
         theUpdate = theUpdate & "," & s
      Else
         theUpdate = s
      End If
   End If
End Sub

I'm updating an Access database on the desktop.   What I'm doing is
using the Winsock control to send an SQL statement to a "Base Station"
application on the desktop.     It is working, except for a few quirks
I've yet to solve.

One of the quirks is that the UPDATE statement fails if it has one of
the fields as an empty string.    For example:   UPDATE Customers SET
CustomerID = 'ALFKI',CompanyName = '' WHERE CustomerID = 'ALFKI',
fails because "CompanyName" is to be set to an empty string.

I'm thinking this is an Access limitation, because I think most
databases will accept such a statement.

Thanks again,
Edgard L. Riba


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to