constraint problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Agnes

    #1

    constraint problem

    I had declare the keyconstraint.
    Dim con_id_rv As ForeignKeyConst raint
    con_id_rv = New ForeignKeyConst raint("fk_id",
    dtInv.Columns(" invno"), dtRv.Columns("i nvno"))

    However, I got one error
    Object reference not set to an instance of an object.

    Please help.
    Thanks a lot


  • Marina Levit [MVP]

    #2
    Re: constraint problem

    Why don't you put a breakpoint where you are creating the constraint, and
    make sure all these objects aren't null. This would be the easiest and
    fastest way to fix the problem.

    "Agnes" <agnes@dynamict ech.com.hkwrote in message
    news:%23X8kAZ7v GHA.4436@TK2MSF TNGP06.phx.gbl. ..
    >I had declare the keyconstraint.
    Dim con_id_rv As ForeignKeyConst raint
    con_id_rv = New ForeignKeyConst raint("fk_id",
    dtInv.Columns(" invno"), dtRv.Columns("i nvno"))
    >
    However, I got one error
    Object reference not set to an instance of an object.
    >
    Please help.
    Thanks a lot
    >
    >

    Comment

    Working...