Re: SELECT is fine, but INSERT gets Timeout Expired



Hi Russell,
Thank you for your reply. I tried that at first, but did not solve my
problem. However, I figured it out. The login I was connecting to the
database with did not have specific read/write permission on that database.
However, what is weird is that I have also tried with the 'sa' account, and I
had the same problem.... but now I gave the other login read/write
permission, I can insert and update the table fine using 'sa' account......
weird...

Well i'm happy at least this step is resolved. Maybe I'll be back with some
more questions, hopefully with somthing more challenging :)

Thanks again.


"Russell Fields" wrote:

> Slim,
>
> Of course an INSERT can take longer than a SELECT. I suspect that you are
> being blocked by some lock in the system and your INSERT is timing out after
> 30 seconds. Things to do:
>
> 1 - Do your insert and then run (in query analyzer) sp_who. Look to see if
> your process (spid) is being blocked by another. If so, in the BLK column
> will be the spid that is getting in your way. Check that process to see it
> is doing. That may be where a change is needed.
>
> 2 - Increase the timeout from the default of 30 seconds.
>
> RLF
>
>
> "Slim" <Slim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:F14E5D52-167E-4259-80C0-1521E4062A64@xxxxxxxxxxxxxxxx
> >I have a computer A in Domain AA,
> > and have SQL Server installed on computer B in Domain BB.
> >
> > When I connect from computer A to SQL intance in B using script or C#
> > program, SELECT statements work fine, but when I try INSERT I get "Timeout
> > expired." Does anyone know what I can try to remedy the situation?
> >
> > For example, I have following connectionstring in vbs:
> >
> > oCn.ConnectionString = "Provider=sqloledb;Data
> > Source=ipaddress,1433;Network
> > Library=DBMSSOCN;Initial Catalog=databasename;User ID="& sLogin &
> > ";Password="& sPwd & ";"
> >
> > Following works fine:
> > oCn.open
> > oRs.Open "exec spgetstatus", oCn
> > (spgetstatus stored proc simply does select from a table),
> >
> > But following I get error:
> > oRs.Open "Insert into tblTestTable (TMAName) values ('from script')", oCn
> >
> > I get "Microsoft OLE DB Provider for SQL Server: Timeout expired" error.
> >
> > Any suggestions on what I need to change from the connecting machine
> > and/or
> > on the sql server installed machine??
> >
> > Thank you!!
>
>
>
.



Relevant Pages

  • Re: Difficulty setting up 210 Router. Cannot log on to 192.168.1.1
    ... once i try and login the page keeps on refereshing itself until ... Try a different browser (IE6, IE7, ... No, the firewall might prevent you from connecting in the first place, ... connected and all the lights on the router suggest it is good to go so ...
    (alt.internet.wireless)
  • Re: How to block SOME remote users while allowing others?
    ... use reconnact.exe to log the current ip client of the user that ... and also create a connection and disconnection logon script. ... But that will limit them also when connecting from the inside. ... The login is from that terminal only, ...
    (microsoft.public.windows.terminal_services)
  • Re: Connecting to a Headless machine, after install
    ... > I have setup a headless machine via a null modem cable. ... Instalation went ... is connecting to the machine after the ... > the login: ...
    (freebsd-questions)
  • Re: Connecting to a Headless machine, after install
    ... > I have setup a headless machine via a null modem cable. ... Instalation went ... is connecting to the machine after the ... > the login: ...
    (freebsd-stable)