Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Can you Help me, please?

3 posts in FoxPro Last posting was on 2006-12-15 18:30:05.0Z
Hugo Glez. Posted on 2006-12-13 04:16:28.0Z
From: "Hugo Glez." <gomh7172@hotmail.com>
Newsgroups: advantage.foxpro
Subject: Can you Help me, please?
Date: Tue, 12 Dec 2006 22:16:28 -0600
Lines: 118
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_002F_01C71E3B.2B671C70"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
NNTP-Posting-Host: 189.165.1.29
Message-ID: <457f7d8f@solutions.advantagedatabase.com>
X-Trace: 12 Dec 2006 21:11:59 -0700, 189.165.1.29
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!189.165.1.29
Xref: solutions.advantagedatabase.com Advantage.FoxPro:212
Article PK: 1109568

I trying to do this, and when it's execute the next line

lres = prmRS.Open(pcomando,lcCnx,3,3)

I have the next error: Error 3010: Unknown alias name used with field name in Index key expression

this is my code and the tables are dbf's:

dirCliente = "L:\Desarrollo\TABLAS_CAPOK"

connectionString = "Provider=Advantage OLE DB Provider;"+;

"Data Source="+dirCliente+";"+;

"ServerType=ADS_LOCAL_SERVER;"+;

"TableType=ADS_CDX;"

lcCnx=CREATEOBJECT("ADODB.Connection")

lcCnx.connectionString = connectionString

lcCnx.OPEN()

prmRS=CREATEOBJECT("ADODB.RecordSet")

prmRS.LockType = 3

prmRS.CursorLocation= 3

prmRS.CursorType= 0

goCurAdap = CREATEOBJECT("CursorAdapter")

goCurAdap.DataSourceType="ADO"

pComando = "select an_codigo, an_nombre from analisis where an_codigo='00054'"

lres = prmRS.Open(pcomando,lcCnx,3,3)

goCurAdap.Alias = "qtemp"

goCurAdap.CursorFill(,,,prmRS)


Mark Wilkins Posted on 2006-12-13 15:24:51.0Z
From: "Mark Wilkins" <mark@no.email>
Newsgroups: advantage.foxpro
References: <457f7d8f@solutions.advantagedatabase.com>
Subject: Re: Can you Help me, please?
Date: Wed, 13 Dec 2006 08:24:51 -0700
Lines: 87
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0253_01C71E90.29289D80"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
NNTP-Posting-Host: 10.24.38.228
Message-ID: <45801a46@solutions.advantagedatabase.com>
X-Trace: 13 Dec 2006 08:20:38 -0700, 10.24.38.228
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.38.228
Xref: solutions.advantagedatabase.com Advantage.FoxPro:213
Article PK: 1109566

Hi Hugo,
 
I just ran this code and it worked fine for me (after changing the table and field to something that I have).  So the code seems to be fine. I am guessing that the problem is that table analisis has an index tag that Advantage does not recognize.  It may be using a table alias in an invalid format possibly.  Can you open the table with Advantage Data Architect?
 

Mark Wilkins
Advantage R&D
"Hugo Glez." <gomh7172@hotmail.com> wrote in message news:457f7d8f@solutions.advantagedatabase.com...

I trying to do this, and when it's execute the next line

lres = prmRS.Open(pcomando,lcCnx,3,3)

I have the next error: Error 3010: Unknown alias name used with field name in Index key expression

 


Hugo Glez. Posted on 2006-12-15 18:30:05.0Z
From: "Hugo Glez." <gomh7172@hotmail.com>
Newsgroups: advantage.foxpro
References: <457f7d8f@solutions.advantagedatabase.com> <45801a46@solutions.advantagedatabase.com>
Subject: Re: Can you Help me, please?
Date: Fri, 15 Dec 2006 12:30:05 -0600
Lines: 121
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_001A_01C72044.C2F9E350"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
NNTP-Posting-Host: 189.165.1.29
Message-ID: <4582e8a0@solutions.advantagedatabase.com>
X-Trace: 15 Dec 2006 11:25:36 -0700, 189.165.1.29
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!189.165.1.29
Xref: solutions.advantagedatabase.com Advantage.FoxPro:214
Article PK: 1109567

Thank you Mark
 
You have to reason, the index table have a invalid format, the index have the next expresssion "analisis.an_codigo" and I change just for "an_codigo", without "analisis." now it's correct.
 
Thank you
 
Hugo Glez.
Cibernetica de Mexico
"Mark Wilkins" <mark@no.email> escribió en el mensaje news:45801a46@solutions.advantagedatabase.com...
Hi Hugo,
 
I just ran this code and it worked fine for me (after changing the table and field to something that I have).  So the code seems to be fine. I am guessing that the problem is that table analisis has an index tag that Advantage does not recognize.  It may be using a table alias in an invalid format possibly.  Can you open the table with Advantage Data Architect?
 

Mark Wilkins
Advantage R&D
"Hugo Glez." <gomh7172@hotmail.com> wrote in message news:457f7d8f@solutions.advantagedatabase.com...

I trying to do this, and when it's execute the next line

lres = prmRS.Open(pcomando,lcCnx,3,3)

I have the next error: Error 3010: Unknown alias name used with field name in Index key expression