Ask a Question related to ASP Database, Design and Development.
-
viktor #1
Help conect to SQL
Hi i need help with this code.
Set conn1=Server.CreateObject("ADODB.Connection")
conn1.ConnectionString="Provider=SQLOLEDB; Data Source=ASF_SQL; Initial
Catalog=play4; User ID=viktors; Password=viktor"
Set rsEmps=Server.CreateObject("ADODB.Recordset")
strSQL="select
p21_view_oe_hdr.order_no,p21_view_oe_pick_ticket.p ick_ticket_no,order_date,s
hip2_name,ship2_add1,ship2_add2,ship2_city,ship2_s tate,ship2_zip,po_no,track
ing_no,ship_date,name"
strSQL=strSQL+"FROM dbo.address INNER JOIN dbo.p21_view_oe_pick_ticket ON
dbo.address.id = dbo.p21_view_oe_pick_ticket.carrier_id LEFT OUTER JOIN
dbo.p21_view_oe_hdr ON dbo.p21_view_oe_pick_ticket.order_no =
dbo.p21_view_oe_hdr.order_no where p21_view_oe_hdr.order_no='105594'"
rsEmps.Open strSQL, conn1, , , adCmdTable
I an getting error:Error Type:
ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed
or invalid in this context
inthe last line
any help is greatful.
viktor Guest
-
Window client conect to FMS installed Server
Hello everybody! I used FMS 2 + Action Script2 for developing my application on window and it worked well. My application is Client-Server... -
Can't conect - access denied
I recently changed hosting providers, and simply moved all of the files in my public_html folder over to my new public directory. However, when I... -
how to know FMS2 check client is not conect ?
How to know Flash media server 2 check client is not connect( i have meet problem client fall net work but FMS2 is not know client is not connect ) -
Can't conect to DB2 on iSeries (AS400)
CF Administrator setup: CF Data Source Name metdb2 Database name of library I am trying to access on the... -
cannot conect the dots
I am modifying text, I made the letter into points and cut it and moved parts, I know there is a way to connect the points of the pieces but cannot... -
Ray at #2
Re: Help conect to SQL
You don't have a conn.open anywhere.
But, you could do this:
strSQL="select
p21_view_oe_hdr.order_no,p21_view_oe_pick_ticket.p ick_ticket_no,order_date,s
hip2_name,ship2_add1,ship2_add2,ship2_city,ship2_s tate,ship2_zip,po_no,track
ing_no,ship_date,name"
strSQL=strSQL+"FROM dbo.address INNER JOIN dbo.p21_view_oe_pick_ticket ON
dbo.address.id = dbo.p21_view_oe_pick_ticket.carrier_id LEFT OUTER JOIN
dbo.p21_view_oe_hdr ON dbo.p21_view_oe_pick_ticket.order_no =
dbo.p21_view_oe_hdr.order_no where p21_view_oe_hdr.order_no='105594'"
Set conn1=Server.CreateObject("ADODB.Connection")
conn1.Open "Provider=SQLOLEDB; Data Source=ASF_SQL; Initial Catalog=play4;
User ID=viktors; Password=viktor"
Set rsEmps = conn1.Execute(strSQL)
Ray at work
"viktor" <serguienkov@hotmail.com> wrote in message
news:%23sh$5RpkDHA.372@TK2MSFTNGP11.phx.gbl...p21_view_oe_hdr.order_no,p21_view_oe_pick_ticket.p ick_ticket_no,order_date,s> Hi i need help with this code.
>
> Set conn1=Server.CreateObject("ADODB.Connection")
> conn1.ConnectionString="Provider=SQLOLEDB; Data Source=ASF_SQL; Initial
> Catalog=play4; User ID=viktors; Password=viktor"
>
>
> Set rsEmps=Server.CreateObject("ADODB.Recordset")
> strSQL="select
>hip2_name,ship2_add1,ship2_add2,ship2_city,ship2_s tate,ship2_zip,po_no,track>closed> ing_no,ship_date,name"
> strSQL=strSQL+"FROM dbo.address INNER JOIN dbo.p21_view_oe_pick_ticket ON
> dbo.address.id = dbo.p21_view_oe_pick_ticket.carrier_id LEFT OUTER JOIN
> dbo.p21_view_oe_hdr ON dbo.p21_view_oe_pick_ticket.order_no =
> dbo.p21_view_oe_hdr.order_no where p21_view_oe_hdr.order_no='105594'"
> rsEmps.Open strSQL, conn1, , , adCmdTable
>
> I an getting error:Error Type:
> ADODB.Recordset (0x800A0E7D)
> The connection cannot be used to perform this operation. It is either> or invalid in this context
> inthe last line
>
> any help is greatful.
>
>
Ray at Guest
-
viktor #3
Re: Help conect to SQL
Now I am gatting error:
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near '.'.
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:uaODDVpkDHA.2964@tk2msftngp13.phx.gbl...p21_view_oe_hdr.order_no,p21_view_oe_pick_ticket.p ick_ticket_no,order_date,s> You don't have a conn.open anywhere.
>
> But, you could do this:
>
> strSQL="select
>hip2_name,ship2_add1,ship2_add2,ship2_city,ship2_s tate,ship2_zip,po_no,track>p21_view_oe_hdr.order_no,p21_view_oe_pick_ticket.p ick_ticket_no,order_date,s> ing_no,ship_date,name"
> strSQL=strSQL+"FROM dbo.address INNER JOIN dbo.p21_view_oe_pick_ticket ON
> dbo.address.id = dbo.p21_view_oe_pick_ticket.carrier_id LEFT OUTER JOIN
> dbo.p21_view_oe_hdr ON dbo.p21_view_oe_pick_ticket.order_no =
> dbo.p21_view_oe_hdr.order_no where p21_view_oe_hdr.order_no='105594'"
>
>
> Set conn1=Server.CreateObject("ADODB.Connection")
> conn1.Open "Provider=SQLOLEDB; Data Source=ASF_SQL; Initial Catalog=play4;
> User ID=viktors; Password=viktor"
> Set rsEmps = conn1.Execute(strSQL)
>
>
> Ray at work
>
>
>
> "viktor" <serguienkov@hotmail.com> wrote in message
> news:%23sh$5RpkDHA.372@TK2MSFTNGP11.phx.gbl...>> > Hi i need help with this code.
> >
> > Set conn1=Server.CreateObject("ADODB.Connection")
> > conn1.ConnectionString="Provider=SQLOLEDB; Data Source=ASF_SQL; Initial
> > Catalog=play4; User ID=viktors; Password=viktor"
> >
> >
> > Set rsEmps=Server.CreateObject("ADODB.Recordset")
> > strSQL="select
> >hip2_name,ship2_add1,ship2_add2,ship2_city,ship2_s tate,ship2_zip,po_no,track>> >ON> > ing_no,ship_date,name"
> > strSQL=strSQL+"FROM dbo.address INNER JOIN dbo.p21_view_oe_pick_ticket> closed> > dbo.address.id = dbo.p21_view_oe_pick_ticket.carrier_id LEFT OUTER JOIN
> > dbo.p21_view_oe_hdr ON dbo.p21_view_oe_pick_ticket.order_no =
> > dbo.p21_view_oe_hdr.order_no where p21_view_oe_hdr.order_no='105594'"
> > rsEmps.Open strSQL, conn1, , , adCmdTable
> >
> > I an getting error:Error Type:
> > ADODB.Recordset (0x800A0E7D)
> > The connection cannot be used to perform this operation. It is either>> > or invalid in this context
> > inthe last line
> >
> > any help is greatful.
> >
> >
>
viktor Guest
-
viktor #4
Re: Help conect to SQL
I can't see why i am getting this
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near '.'.
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:uaODDVpkDHA.2964@tk2msftngp13.phx.gbl...p21_view_oe_hdr.order_no,p21_view_oe_pick_ticket.p ick_ticket_no,order_date,s> You don't have a conn.open anywhere.
>
> But, you could do this:
>
> strSQL="select
>hip2_name,ship2_add1,ship2_add2,ship2_city,ship2_s tate,ship2_zip,po_no,track>p21_view_oe_hdr.order_no,p21_view_oe_pick_ticket.p ick_ticket_no,order_date,s> ing_no,ship_date,name"
> strSQL=strSQL+"FROM dbo.address INNER JOIN dbo.p21_view_oe_pick_ticket ON
> dbo.address.id = dbo.p21_view_oe_pick_ticket.carrier_id LEFT OUTER JOIN
> dbo.p21_view_oe_hdr ON dbo.p21_view_oe_pick_ticket.order_no =
> dbo.p21_view_oe_hdr.order_no where p21_view_oe_hdr.order_no='105594'"
>
>
> Set conn1=Server.CreateObject("ADODB.Connection")
> conn1.Open "Provider=SQLOLEDB; Data Source=ASF_SQL; Initial Catalog=play4;
> User ID=viktors; Password=viktor"
> Set rsEmps = conn1.Execute(strSQL)
>
>
> Ray at work
>
>
>
> "viktor" <serguienkov@hotmail.com> wrote in message
> news:%23sh$5RpkDHA.372@TK2MSFTNGP11.phx.gbl...>> > Hi i need help with this code.
> >
> > Set conn1=Server.CreateObject("ADODB.Connection")
> > conn1.ConnectionString="Provider=SQLOLEDB; Data Source=ASF_SQL; Initial
> > Catalog=play4; User ID=viktors; Password=viktor"
> >
> >
> > Set rsEmps=Server.CreateObject("ADODB.Recordset")
> > strSQL="select
> >hip2_name,ship2_add1,ship2_add2,ship2_city,ship2_s tate,ship2_zip,po_no,track>> >ON> > ing_no,ship_date,name"
> > strSQL=strSQL+"FROM dbo.address INNER JOIN dbo.p21_view_oe_pick_ticket> closed> > dbo.address.id = dbo.p21_view_oe_pick_ticket.carrier_id LEFT OUTER JOIN
> > dbo.p21_view_oe_hdr ON dbo.p21_view_oe_pick_ticket.order_no =
> > dbo.p21_view_oe_hdr.order_no where p21_view_oe_hdr.order_no='105594'"
> > rsEmps.Open strSQL, conn1, , , adCmdTable
> >
> > I an getting error:Error Type:
> > ADODB.Recordset (0x800A0E7D)
> > The connection cannot be used to perform this operation. It is either>> > or invalid in this context
> > inthe last line
> >
> > any help is greatful.
> >
> >
>
viktor Guest
-
Bob Barrows #5
Re: Help conect to SQL
Do a
Response.Write strSQL
to see the actual query you are sending to the server. That should tell you
where the problem is. If not, copy it off the browser window and paste it
into Query Analyzer and try it there. You will probably get a better error
message.
viktor wrote:p21_view_oe_hdr.order_no,p21_view_oe_pick_ticket.p ick_ticket_no,order_date,s> I can't see why i am getting this
> Error Type:
> Microsoft OLE DB Provider for SQL Server (0x80040E14)
> Line 1: Incorrect syntax near '.'.
>
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in
> message news:uaODDVpkDHA.2964@tk2msftngp13.phx.gbl...>>> You don't have a conn.open anywhere.
>>
>> But, you could do this:
>>
>> strSQL="select
>>hip2_name,ship2_add1,ship2_add2,ship2_city,ship2_s tate,ship2_zip,po_no,track>>>p21_view_oe_hdr.order_no,p21_view_oe_pick_ticket.p ick_ticket_no,order_date,s>>> ing_no,ship_date,name"
>> strSQL=strSQL+"FROM dbo.address INNER JOIN
>> dbo.p21_view_oe_pick_ticket ON dbo.address.id =
>> dbo.p21_view_oe_pick_ticket.carrier_id LEFT OUTER JOIN
>> dbo.p21_view_oe_hdr ON dbo.p21_view_oe_pick_ticket.order_no =
>> dbo.p21_view_oe_hdr.order_no where
>> p21_view_oe_hdr.order_no='105594'"
>>
>>
>> Set conn1=Server.CreateObject("ADODB.Connection")
>> conn1.Open "Provider=SQLOLEDB; Data Source=ASF_SQL; Initial
>> Catalog=play4; User ID=viktors; Password=viktor"
>> Set rsEmps = conn1.Execute(strSQL)
>>
>>
>> Ray at work
>>
>>
>>
>> "viktor" <serguienkov@hotmail.com> wrote in message
>> news:%23sh$5RpkDHA.372@TK2MSFTNGP11.phx.gbl...>>>>> Hi i need help with this code.
>>>
>>> Set conn1=Server.CreateObject("ADODB.Connection")
>>> conn1.ConnectionString="Provider=SQLOLEDB; Data Source=ASF_SQL;
>>> Initial Catalog=play4; User ID=viktors; Password=viktor"
>>>
>>>
>>> Set rsEmps=Server.CreateObject("ADODB.Recordset")
>>> strSQL="select
>>>hip2_name,ship2_add1,ship2_add2,ship2_city,ship2_s tate,ship2_zip,po_no,track>>>>>>>>> ing_no,ship_date,name"
>>> strSQL=strSQL+"FROM dbo.address INNER JOIN
>>> dbo.p21_view_oe_pick_ticket ON dbo.address.id =
>>> dbo.p21_view_oe_pick_ticket.carrier_id LEFT OUTER JOIN
>>> dbo.p21_view_oe_hdr ON dbo.p21_view_oe_pick_ticket.order_no =
>>> dbo.p21_view_oe_hdr.order_no where
>>> p21_view_oe_hdr.order_no='105594'" rsEmps.Open strSQL, conn1, , ,
>>> adCmdTable
>>>
>>> I an getting error:Error Type:
>>> ADODB.Recordset (0x800A0E7D)
>>> The connection cannot be used to perform this operation. It is
>>> either closed or invalid in this context
>>> inthe last line
>>>
>>> any help is greatful.
Bob Barrows Guest



Reply With Quote

