Re: well, it worked in sqlserver Insert fails in oledb

From: Kurt Schroeder (KurtSchroeder_at_discussions.microsoft.com)
Date: 02/03/05


Date: Thu, 3 Feb 2005 06:17:08 -0800

Thank You for your reply.

Primary Key is typID as an auto Number, I replaced the param with a question
mark and i get the same problem. I even try:
 Insert into typ (TypName) Values('Kris') What or who needs to be added to
the directory security for this file?
THanks
kes

"W.G. Ryan eMVP" wrote:

> First make sure you have a Key on the table and that you can actually write
> to the access db. Next, replace your params with ? and try it again.
>
> --
> W.G. Ryan MVP (Windows Embedded)
>
> TiBA Solutions
> www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
> "Kurt Schroeder" <KurtSchroeder@discussions.microsoft.com> wrote in message
> news:6108118E-D9CE-49FF-B267-2EF878A5111F@microsoft.com...
> > This insert does not work and i don't know why. I get the following error
> > System.Data.OleDb.OleDbException: Operation must use an updateable query.
> > on the cmdInsert.ExecuteNonQuery()
> > I'm sure it's going to be simple
> > thanks
> > kes
> > Function AddStone(ByVal thsStone)
> > Dim conAddStone As OleDbConnection
> > Dim strInsert As String
> > Dim cmdInsert As OleDbCommand
> > conAddStone = New
> > OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" &
> thsSitePath
> > & "db\damarstone.mdb")
> > strInsert = "Insert into typ (TypName) Values(@thsStone)"
> > cmdInsert = New OleDbCommand(strInsert, conAddStone)
> > 'cmdInsert.Parameters.Add("@thsStone", thsStone)
> > conAddStone.Open()
> > cmdInsert.ExecuteNonQuery()
> > conAddStone.Close()
> > End Function
>
>
>



Relevant Pages

  • Re: How to play FullScreen and auto hide the toolbars
    ... Set uimode="none" in your param. ... Cheers - Neil ... jskfung@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (johnfung) wrote: ... >When I click the image, it played in FullScreen, but didn't auto hide ...
    (microsoft.public.windowsmedia.player.web)
  • Re: OleDbDataAdapter.Update and DBase IV
    ... BTW you might avoid changing TABLETYPE as it is unique? ... miha at rthand com ... "mark" wrote in message ... > Param = daATBD.UpdateCommand.Parameters.Add(new ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: CGI::Session with MySQL Driver
    ... > Mark Clements a écrit: ... >> Show us your code using param. ... >> Does it work with the File driver? ... message or unexpected behaviour you get with the code above. ...
    (comp.lang.perl.misc)
  • Re: CGI::Session with MySQL Driver
    ... > Mark Clements a écrit: ... >> Alexandre Jaquet wrote: ... >> Don't use store, use param. ... Show us your code using param. ...
    (comp.lang.perl.misc)