shape command giving error

Results 1 to 3 of 3

Thread: shape command giving error

  1. #1
    Join Date
    Dec 1969
    Posts
    96

    Default shape command giving error

    I have written the following code (Please go through)<BR>Dim cn<BR>Set cn = Server.CreateObject("ADODB.Connection")<BR>cn.Open "Provider=MSDataShape;" & _<BR> "Driver={SQL Server};Server=PAN3;Database=CFR_TEST;" & _<BR> "UID=sa;PWD=;"<BR> <BR>dim sql<BR>sql = " SHAPE ( SHAPE {Select ProjectId,ProjectName From MPROJECT where ProjectID=1063} AS Project APPEND ({SELECT * FROM " & """dbo" & """." & """TIMEREC" & """} AS ActualRevenue RELATE &#039;ProjectId&#039; TO &#039;ProjectId&#039;) AS ActualRevenue, SUM(ActualRevenue.&#039;Units&#039;) AS Aggregate1,({SELECT * FROM " & """dbo" & """." & """F_REVENUE" & """} AS ForecastedRevenue RELATE &#039;ProjectId&#039; TO &#039;ProjectID&#039;) AS ForecastedRevenue, SUM(ForecastedRevenue.&#039;ContingentFees&#039;) AS Aggregate2) COMPUTE Project BY &#039;ProjectId&#039;" <BR><BR>dim rs<BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>rs.Op en sql,cn,adOpenStatic,adLockReadOnly <BR><BR>When I execute this, I get the following error for the last line.:<BR>ADODB.Recordset (0x800A0BB9)<BR>Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<BR><BR>I have executed this command using VB Dataenvironment and datagrid and it works fine. Please help

  2. #2
    Join Date
    Dec 1969
    Posts
    19,082

    Default RE: shape command giving error

    1. I&#039;d be using a provider in place of a driver<BR><BR>"Provider=MSADATSHAPE;Data Provider=SQLOLEDB;Server=whatever;database=myDB;ui d=sa;pwd=********"<BR><BR>2. what&#039;s the actual content of that concatenated query ? (Response.Write sql )<BR><BR>3. can&#039;t rember 100%, but I think you need a final parameter on the rs.open call. use adCmdtext or adCmdUnknown<BR><BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    96,118

    Default ASPFAQs, category Databases, Errors

    The link to the ASPFAQs is at the top right corner of THIS VERY PAGE.<BR><BR>Your question is in the ASPFAQs, under the category named above.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •