Error in ASP 0x80040E0C

Error in ASP 0x80040E0C

am 06.09.2005 17:07:45 von Lakrom

Hello to all, I have the following code that consults a data base SQL
server:
SET CONN = Server.CreateObject("ADODB.Connection")
CONN.Open application("StrConApp")
Set R = conn.Execute("select * from usuarios order by cargo")
strSQLs = "select
Venta,Margen,Abrasion,Steel,AcEsp,KAB,SIndustrial,Cables,Fer roL,Emsesa,VtaEstrategiaUS,Recomendacion_sacateun7,VtaCtesDl lo,CtesNuevos,VtaPref,NPref,PCT,NServicio
from dbo.Metas where RUT='"&rtrim(R("rut"))&"'"
response.Write(strSQLs)
'response.End()
set T = conn.execute(strSQL)

and it throws the following error to me:
Tipo de error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E0C)
Any text of commando for the commando object did not settle down.

Any aid would be pleasant.
Thanks

Re: Error in ASP 0x80040E0C

am 06.09.2005 18:26:36 von Lakrom

Ya resolvi el error.

"Lakrom" escribió en el mensaje
news:YgiTe.499$UA6.1179@jagger.tie.cl...
> Hello to all, I have the following code that consults a data base SQL
> server:
> SET CONN = Server.CreateObject("ADODB.Connection")
> CONN.Open application("StrConApp")
> Set R = conn.Execute("select * from usuarios order by cargo")
> strSQLs = "select
> Venta,Margen,Abrasion,Steel,AcEsp,KAB,SIndustrial,Cables,Fer roL,Emsesa,VtaEstrategiaUS,Recomendacion_sacateun7,VtaCtesDl lo,CtesNuevos,VtaPref,NPref,PCT,NServicio
> from dbo.Metas where RUT='"&rtrim(R("rut"))&"'"
> response.Write(strSQLs)
> 'response.End()
> set T = conn.execute(strSQL)
>
> and it throws the following error to me:
> Tipo de error:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E0C)
> Any text of commando for the commando object did not settle down.
>
> Any aid would be pleasant.
> Thanks
>

Re: Error in ASP 0x80040E0C

am 06.09.2005 19:00:54 von reb01501

Lakrom wrote:
> Hello to all, I have the following code that consults a data base SQL
> server:
> SET CONN = Server.CreateObject("ADODB.Connection")
> CONN.Open application("StrConApp")

You have a DSN called "StrConApp"? See:
http://www.aspfaq.com/show.asp?id=2126

> Set R = conn.Execute("select * from usuarios order by cargo")
> strSQLs = "select
>
Venta,Margen,Abrasion,Steel,AcEsp,KAB,SIndustrial,Cables,Fer roL,Emsesa,VtaEs
trategiaUS,Recomendacion_sacateun7,VtaCtesDllo,CtesNuevos,Vt aPref,NPref,PCT,
NServicio
> from dbo.Metas where RUT='"&rtrim(R("rut"))&"'"
> response.Write(strSQLs)
> 'response.End()
> set T = conn.execute(strSQL)
>
> and it throws the following error to me:
> Tipo de error:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E0C)
> Any text of commando for the commando object did not settle down.
>
Which is the line that causes the error?

You should make it a habit to show us the result of response.Write(strSQLs).
This may contain the key to your problem ...

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Error in ASP 0x80040E0C

am 06.09.2005 19:10:53 von reb01501

Lakrom wrote:
> Hello to all, I have the following code that consults a data base SQL
> server:
> SET CONN = Server.CreateObject("ADODB.Connection")
> CONN.Open application("StrConApp")
> Set R = conn.Execute("select * from usuarios order by cargo")
> strSQLs = "select
>
Venta,Margen,Abrasion,Steel,AcEsp,KAB,SIndustrial,Cables,Fer roL,Emsesa,VtaEs
trategiaUS,Recomendacion_sacateun7,VtaCtesDllo,CtesNuevos,Vt aPref,NPref,PCT,
NServicio
> from dbo.Metas where RUT='"&rtrim(R("rut"))&"'"
> response.Write(strSQLs)
> 'response.End()
> set T = conn.execute(strSQL)
>
> and it throws the following error to me:
> Tipo de error:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E0C)
> Any text of commando for the commando object did not settle down.
>
Oh! You have your variables mixed up. See? You have
strSQLs = "select ...

and then
set T = conn.execute(strSQL)


See the problem? strSQL is empty.

You should use "Option Explicit" to force yourself to declare all your
variables. If you had used "Option Explicit" at the beginning of your code,
you would have received a more informative error message.

Bob Barrows


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.