Results 1 to 2 of 2

Thread: inserting

  1. #1
    Join Date
    Dec 2003
    Posts
    27

    Unanswered: inserting

    how can I make the statements still works if variable k is null ?


    strSQL = "Insert into Testing(AttribXrefID, AttribXrefGrpNumber,AppsID, EntID,AttribID, AttribName, DataTypeCode,Comment) Values( " _
    & newXrefID & "," & NewGAttrib & "," & g & "," & h & "," & i & ",'" & j & "','" & k & "','" & l & "')"

    CurrentDb.Execute strSQL

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Oleg123
    how can I make the statements still works if variable k is null ?


    strSQL = "Insert into Testing(AttribXrefID, AttribXrefGrpNumber,AppsID, EntID,AttribID, AttribName, DataTypeCode,Comment) Values( " _
    & newXrefID & "," & NewGAttrib & "," & g & "," & h & "," & i & ",'" & j & "','" & k & "','" & l & "')"

    CurrentDb.Execute strSQL
    ... k & "" ...

    Although technically it should work fine because you've end up with just an empty string to insert ...
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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