Hi,
Removing the question mark wives an error, which is expected since it would be like passing a string without quotes.
I did assign a value to gnEventChosen before trying to create the view. The code is inside a function and I even tried declaring the variable inside the function, since the function will only run once and then whenever I use the view I declare the variable public, but it didn't work.
Thanks
>Hola Raul,
>
>Have you tried removing the question mark from the parameter? I know it doesn't make sense, but perhaps it will work.
>
>Another possibility would be to assign a value to the parameter before attempting to create the view. I don't see anything wrong with the code itself.
>
>Alex
>
>
>>Hi everyone,
>>
>>I'm having a problem creating a remote view.
>>I have 3 tables as follows:
>>events -> eventid, eventname, eventdate
>>companies -> companyid, companyname, etc...
>>eventsattendance -> eventid, companyid
>>
>>The table "events" holds the description of the events, shows, etc...
>>The table "companies" holds companies information
>>The table "eventsattendance" holds which companies went to which events
>>
>>From those tables I need to produce a view with all the companies who attended a particular event. This is the code:
>> CREATE VIEW eventcompanies REMOTE CONN 'sql server' AS ;
>> SELECT eventattendance.companyid, eventattendance.eventid, ;
>> events.actdate, events.actname, companies.companyname FROM eventattendance ;
>> LEFT OUTER JOIN events ON eventsattendance.actid = events.actid ;
>> LEFT OUTER JOIN companies ON eventsattendance.companyid = companies.fullid ;
>> ORDER BY eventsattendance.actid, company_name ;
>> WHERE eventsattendance.actid = ?gnEventChosen
>>
>>The message it gives is:
>> Program Error: No result set has been returned by the server.
>>
>>If I execute the select query alone, after assigning a value to gnEventChosen, it succeeds. If I change the WHERE clause and use a static parameter (WHERE eventsattendance.actid = 1) it succeeds.
>>
>>So obviously the problem is the parameter.
>>
>>Thanks in advance for your help.
R. Davila
DBA / Network Administrator
Administracion de Fomento Comercial
Gobierno de Puerto Rico
Still waiting for FoxPro for LINUX