Home All Groups Group Topic Archive Search About

HELP!! - Data type mismatch in criteria expression

Author
21 Feb 2006 8:24 AM
Bantha
Hi i keep getting a "Data type mismatch in criteria expression. " error
with my asp page in thei sectionof code and i cant seem to find the
cause? can any one help

*******************************************CODE********************************************************


Sub Updatedatabase ()

        Strinsert = "Insert into tblgallery (Gallery_title, Gallery_item,
Author, Author_email,Comments , Gallery_Path, Gallery_thumb_PAth)
values ( @strGalleryTitle, @strGalleryItem, @strAuthor,
@strAuthorEmail, @txtcomments, @Strimage, @strThumb)"
    'Try
        Olecon = New oledbconnection ("Provider    = Microsoft.jet.oledb.4.0;
DATA source = C:\Inetpub\wwwroot\INtranetSite\Database\gallery.mdb")
        oleinsert = new oledbcommand (strinsert, olecon)
        oleinsert.parameters.add("@strgallerytitle", GalleryTitle.text)
        oleinsert.parameters.add("@strgalleryitem", GalleryItem.text)
        oleinsert.parameters.add("@strauthor", author.text)
        oleinsert.parameters.add("@strauthoremail", AuthorEmail.text)
        oleinsert.parameters.add("@txtcomments", txtcomments)
        oleinsert.parameters.add("@strimage", strimage)
        oleinsert.parameters.add("@strthumb", strthumb)
        olecon.open()
        oleinsert.executenonquery()
        olecon.close()
        'Catch exp as exception
            'label.text = exp.message
        'end try

end sub
***********************************************************************************************************

Author
21 Feb 2006 2:28 PM
Akbar khan is a Senior Database develope
Hi
check the length of the data I think some of your paramateres's value exceed
the limits.
Thanks
___________________

Show quote
"Bantha" wrote:

> Hi i keep getting a "Data type mismatch in criteria expression. " error
> with my asp page in thei sectionof code and i cant seem to find the
> cause? can any one help
>
> *******************************************CODE********************************************************
>
>
>  Sub Updatedatabase ()
>
>         Strinsert = "Insert into tblgallery (Gallery_title, Gallery_item,
> Author, Author_email,Comments , Gallery_Path, Gallery_thumb_PAth)
> values ( @strGalleryTitle, @strGalleryItem, @strAuthor,
> @strAuthorEmail, @txtcomments, @Strimage, @strThumb)"
>     'Try
>         Olecon = New oledbconnection ("Provider    = Microsoft.jet.oledb.4.0;
> DATA source = C:\Inetpub\wwwroot\INtranetSite\Database\gallery.mdb")
>         oleinsert = new oledbcommand (strinsert, olecon)
>         oleinsert.parameters.add("@strgallerytitle", GalleryTitle.text)
>         oleinsert.parameters.add("@strgalleryitem", GalleryItem.text)
>         oleinsert.parameters.add("@strauthor", author.text)
>         oleinsert.parameters.add("@strauthoremail", AuthorEmail.text)
>         oleinsert.parameters.add("@txtcomments", txtcomments)
>         oleinsert.parameters.add("@strimage", strimage)
>         oleinsert.parameters.add("@strthumb", strthumb)
>         olecon.open()
>         oleinsert.executenonquery()
>         olecon.close()
>         'Catch exp as exception
>             'label.text = exp.message
>         'end try
>
>  end sub
> ***********************************************************************************************************
>
>

AddThis Social Bookmark Button