2 questions: Empty update and SQL update

Results 1 to 2 of 2

Thread: 2 questions: Empty update and SQL update

  1. #1
    Join Date
    Dec 1969

    Default 2 questions: Empty update and SQL update

    Hi-<BR><BR>I asked 2 questions here and Atrax gave me very brief responses. I&#039;ve looked a little into each, but am no better of from it, YET. So I would like to ask again, if anyone can expand on either of these, I would appreciate it:<BR><BR>1) It was suggested that I use SQL to do my updates. I have never done this and am a little confused. I always use ADO, so would I still use ObjRs.Open "UPDATE blah, blah:, ObjConn, etc, etc<BR><BR>or would I use something different? If I don&#039;t get a blank RecSet and do my updates that way, how can I get the ID of the record that I just updated? I looked at the FAQ for this, but it doesn&#039;t seem to address this problem. SO If I wanted to add a whole to record to an Access table using only SQL, where should I be researching this or odes anyone have any examples they would care to share?<BR><BR>2) Empty data. Not all fields on my form are required, yet if I try to update my table with blank data I get an error stating that I cannot have a zero length value. Atrax suggested that I loosen my DB constraints, but as far as I know I have not set any. All fields are text, none are required. So what is the best way to handle this? To code something that would selectively update only the fields that are populated would be a TASK, considering there are about 65 of them. There must be a way to update with blank data.<BR><BR>I could really use the help all, I&#039;m drowning right now ;(<BR><BR><BR>Thanks-<BR>Steve<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: 2 questions: Empty update and SQL update

    1) This really is in the FAQs, (use the JET OLEDB 4.0 drivers and the @@IDENTITY method)<BR><BR>2) INSERT INTO ... VALUES (NULL)<BR><BR>just write out the NULL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts