Hi Karl,
I had tried that before but I get this error message:
error BC30456: 'Value' is not a member of 'Integer'
In Visual Studio the part
With dbCommand.Parameters
.Add(New System.Data.OleDb.OleDbParameter("@title",
OleDbType.VarWChar)).Value
End With
Is underlined and associated with that error.
Any idea?
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:karl REMOVE @ REMOVE openmymind REMOVEMETOO .
ANDME net:
[color=blue]
> Your vb.net syntax is all messy.
>
> you have .Add( <CODE HERE > )
>
> your <CODE HERE> looks like:
>
> New System.Data.OleDb.OleDbParameter("@title", OleDbType.VarWChar).Value =
> "Title Text"
>
> which, I guess, is doing an equallity operartion, instead of an assignment.
> That is, it's checking if
> New System.Data.OleDb.OleDbParameter("@title", OleDbType.VarWChar).Value
> IS EQUAL TO
> "Title Text"
>
> and return false...hence why it's saying you can't add false to .Add()
>
> It should look like:
>
> .Add(New System.Data.OleDb.OleDbParameter("@title",
> OleDbType.VarWChar)).Value = "Title Text"
>
> Karl
>
> --
> MY ASP.Net tutorials
>
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
>
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
> come!)
>
>
> "Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
> news:eGjUGDWhFHA.2444@tk2msftngp13.phx.gbl...
>[color=green]
> > Hello,
> >
> > I am adding a parameter, with only one code line, when I set a connection
> > to an Access database:
> >
> > With dbCommand.Parameters
> >
> > .Add(New System.Data.OleDb.OleDbParameter("@title",
> > OleDbType.VarWChar).Value = "Title Text")
> >
> > End With
> >
> > I get the error: "The OleDbParameterCollection only accepts non-null
> > OleDbParameter type objects, not Boolean objects."
> >
> > Why is that?
> > I have been searching for the solution in Google and I can't see why this
> > is not working.
> >
> > Thanks,
> > Miguel
> >[/color][/color]