Melfeky
asked on
Why am i getting this error:ADODB.Command (0x800A0E7D)
Why am i getting this error:
Error Type:
ADODB.Command (0x800A0E7D)
Requested operation requires an OLE DB Session object, which is not supported by the current provider.
/DIET/forum/diet/swiffchar t.asp, line 26
Here is the asp file:
<%@Language = VBScript %>
<%' use this meta tag instead of adovbs.inc%>
<!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8 000-00AA00 6D2EA4" -->
<%
Response.Expires= 0
Dim currentweight, d_date
Dim Cnxn, strCnxn
Dim rs, strSQL
strCnxn= "db1.mdb"
strCnxn= "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & strCnxn
Set Cnxn= Server.CreateObject("ADODB .Connectio n")
Cnxn.Open strCnxn,1,3,1
Set Cmd= Server.CreateObject("ADODB .Command")
Cmd.ActiveConnection= Cnxn
strSQL = "SELECT * From Weight"
Cmd.CommandText = strSQL
Set rs= Cmd.Execute
currentweight = ""
d_date = ""
rs.MoveFirst
While Not rs.EOF
currentweight = currentweight & rs.Fields(0).Value & ";"
d_date = d_date & rs.Fields(1).Value & ";"
rs.MoveNext
Wend
Cnxn.Close
Set Cmd = Nothing
Set rs = Nothing
Set Cnxn = Nothing
currentweight = Left(currentweight, Len(currentweight) - 1)
d_date = Left(d_date, Len(d_date) - 1)
Dim chart
Set chart= Server.CreateObject("Swiff ChartObjec t.ChartObj ")
chart.SetSeriesCaption 0, "Weight"
chart.SetSeparators ";", true
chart.SetcurrentweightFrom String currentweight
chart.SetSeriesd_dateFromS tring 0, d_date
chart.SetTitle "Weight chart"
chart.LoadStyle "swiff.scs"
chart.ExportAsResponse
Set chart= Nothing
Response.End
%>
Error Type:
ADODB.Command (0x800A0E7D)
Requested operation requires an OLE DB Session object, which is not supported by the current provider.
/DIET/forum/diet/swiffchar
Here is the asp file:
<%@Language = VBScript %>
<%' use this meta tag instead of adovbs.inc%>
<!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8
<%
Response.Expires= 0
Dim currentweight, d_date
Dim Cnxn, strCnxn
Dim rs, strSQL
strCnxn= "db1.mdb"
strCnxn= "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & strCnxn
Set Cnxn= Server.CreateObject("ADODB
Cnxn.Open strCnxn,1,3,1
Set Cmd= Server.CreateObject("ADODB
Cmd.ActiveConnection= Cnxn
strSQL = "SELECT * From Weight"
Cmd.CommandText = strSQL
Set rs= Cmd.Execute
currentweight = ""
d_date = ""
rs.MoveFirst
While Not rs.EOF
currentweight = currentweight & rs.Fields(0).Value & ";"
d_date = d_date & rs.Fields(1).Value & ";"
rs.MoveNext
Wend
Cnxn.Close
Set Cmd = Nothing
Set rs = Nothing
Set Cnxn = Nothing
currentweight = Left(currentweight, Len(currentweight) - 1)
d_date = Left(d_date, Len(d_date) - 1)
Dim chart
Set chart= Server.CreateObject("Swiff
chart.SetSeriesCaption 0, "Weight"
chart.SetSeparators ";", true
chart.SetcurrentweightFrom
chart.SetSeriesd_dateFromS
chart.SetTitle "Weight chart"
chart.LoadStyle "swiff.scs"
chart.ExportAsResponse
Set chart= Nothing
Response.End
%>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
in fact I think the correct syntax is
Call Cnxn.Open(strCnxn)
Call Cnxn.Open(strCnxn)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the allowed values for the fourth parameter of the connection.open method are the possible vlues of ConnectOptionEnum : -1 (default, synchronous) and 16 (asynchronous)
I guess the 1,3,1 is a remain from a copied line (conn.execute strstr, 1,3,1 is more familiar ;-))