views:

69

answers:

1

in plain english can you please explain to me what does this line mean:

Cmd.Parameters.Append _
    Cmd.CreateParameter("datapath", adChar, adParamInput, 100)

i then have a line that writes data to the datapath column:

Cmd.Parameters("datapath").Value = "abc"

but i do not understand the purpose of the first line? what is adChar and adParamInput and what does 100 stand for?

+1  A: 
Cmd.Parameters.Append _
    Cmd.CreateParameter("datapath", adChar, adParamInput, 100)

Append a parameter to the command object of data type character (could be adInteger or any other type) that accepts parameter input for field datapath and is 100 characters long, the length is only required for character data types and should match the field (column) size.

Cmd.Parameters("datapath").Value = "abc"

Set the value of the parameter to "abc"

This is the value that will be put into the table.

Remou