Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DB View in COM server: database is read-only?
Message
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Firebird
Application:
Desktop
Miscellaneous
Thread ID:
01493642
Message ID:
01493646
Views:
44
>>>>I am creating a VFP COM server whose main task will be to access a Firebird database.
>>>>
>>>>I have created an ODBC data source to the Firebird database using a Firebird ODBC driver.
>>>>
>>>>Both the client, the COM server, and the database are on the same computer.
>>>>
>>>>When I use the following statement in the VFP COM server:
>>>>
>>>>
>>>>CREATE SQL VIEW vPatients CONNECTION odbcdsname ;
>>>>	AS SELECT PATIENTS.PatientNo, PATIENTS.NAME, PATIENTS.PatientID ;
>>>>	FROM Patients PATIENTS ;
>>>>	ORDER BY PATIENTS.NAME
>>>>
>>>>
>>>>I get an OLE IDispatch error #1570 saying that the database is read-only, and the view does not get created.
>>>>
>>>>However, if I issue the same statement in a command window, it works; I get the view.
>>>>
>>>>Thanks in advance for your help.
>>>>Jim
>>>
>>>In the code above can you first create a temp database to hold views only ?
>>
>>I have included an empty database in the COM server, and opened it just before the create sql view statement. I neglected to mention that in my original post.
>>
>>Thanks,
>>Jim
>
>Still, try the suggestion. Create a local temp database, create view, do the job, delete the temp database.

thanks Naomi. I'll give it a try.

That's the answer! I get the views I am looking for.

Thanks again.
Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform