CREATE TABLE [dbo].[TABLE001]
    (
    [T001_int] [int] NULL,
    [T001_char] [char](100) NULL,
    [T001_decimal] [decimal](5, 0) NULL
    )
CREATE TABLE [dbo].[TABLE002]
    (
    [T002_int] [int] NULL,
    [T002_char] [char](100) NULL,
    [T002_decimal] [decimal](5, 0) NULL
    )
INSERT INTO TABLE002 VALUES (NULL, NULL, NULL)
TABLE DEFINITION ABOVE
    Dim strQuery    As String
    Dim rdoEnv      As rdoEnvironment
    Dim rdoCon      As rdoConnection
    Dim rdoRS       As rdoResultset
    strQuery = ""
    strQuery = strQuery & " SELECT * FROM TABLE002"
    Set rdoEnv = rdoEnvironments(0)
    Set rdoCon = rdoEnv.OpenConnection("", rdDriverNoPrompt, True, MyCon)
    Set rdoRS = rdoCon.OpenResultset(strQuery, rdOpenKeyset, rdConcurReadOnly)
    Do Until rdoRS.EOF = True
        strQuery = ""
        strQuery = strQuery & " INSERT INTO TABLE001"
        strQuery = strQuery & " VALUES"
        strQuery = strQuery & " (" & rdoRS!T002_int & ", '" & rdoRS!T002_char & "'," & rdoRST002_decimal & ")"
        rdoCon.Execute (strQuery)
        rdoRS.MoveNext
    Loop
Above is my VB6 code
When rdoRS!T002_int = null, error occurs
When rdoRS!T002_char = null, inserted as ''
When rdoRS!T002_decimal = null, error occurs
I want to insert NULL as NULL
How can I fix this
Please don't tell me that I should not do this.
I want to know how to insert as null.
 
     
    