pervasive-sql

How to connect with pervasive database via php

偶尔善良 提交于 2021-02-20 04:09:02
问题 I need to know how can I connect with pervasive database via php. As I know, I have to use ODBC . I configured it on my Windows 7 system and I created table in pervasive server. This is my code, but it does not work: $connect_string = "DRIVER={Pervasive ODBC Client Interface}; SERVERNAME=localhost; SERVERDSN=demodata;"; $conn = odbc_connect($connect_string, 'root', 'root'); 回答1: You probably already have the ODBC drivers installed; I obtained the latest by installing the Pervasive Client from

How to connect with pervasive database via php

荒凉一梦 提交于 2021-02-20 04:07:06
问题 I need to know how can I connect with pervasive database via php. As I know, I have to use ODBC . I configured it on my Windows 7 system and I created table in pervasive server. This is my code, but it does not work: $connect_string = "DRIVER={Pervasive ODBC Client Interface}; SERVERNAME=localhost; SERVERDSN=demodata;"; $conn = odbc_connect($connect_string, 'root', 'root'); 回答1: You probably already have the ODBC drivers installed; I obtained the latest by installing the Pervasive Client from

How to connect with pervasive database via php

≡放荡痞女 提交于 2021-02-20 04:04:49
问题 I need to know how can I connect with pervasive database via php. As I know, I have to use ODBC . I configured it on my Windows 7 system and I created table in pervasive server. This is my code, but it does not work: $connect_string = "DRIVER={Pervasive ODBC Client Interface}; SERVERNAME=localhost; SERVERDSN=demodata;"; $conn = odbc_connect($connect_string, 'root', 'root'); 回答1: You probably already have the ODBC drivers installed; I obtained the latest by installing the Pervasive Client from

Pervasive SQL GRANT syntax

戏子无情 提交于 2021-01-29 09:32:57
问题 I've been Googling for half an hour now, and can't seem to find the right place... How do I add a user and grant that user access to all tables in the database? Found some GRANT snippets, but there is no mentioning of a password, so I assume that can be done on existing users only... But what about adding that user, and password identification? PS: Not sure if it belongs more here, or on serverfault (neither has this answer already)... So feel free to move it, if it should be on serverfault

SQL Column Name wildcard

一笑奈何 提交于 2021-01-28 07:56:06
问题 I have a table with 30+ fields and I want to quickly narrow my selection down to all fields where column name start with 'Flag'. select * Like Flag% from Table1 回答1: You will want to build a dynamic query as explained here: https://stackoverflow.com/a/4797728/9553919 SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'Foods' AND table_schema = 'YourDB' AND column_name LIKE 'Vegetable%' 回答2: This SQL Statement should be useful. You may be able to simplify it but it does work

How can I check if a stored procedure exists in PERVASIVE database before creating it?

戏子无情 提交于 2020-01-17 06:01:08
问题 I want to create a stored procedure in a Pervasive database, but only if it does not yet exist. I found something for SQL Server: IF NOT EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND OBJECT_ID = OBJECT_ID('dbo.MyProc')) exec('CREATE PROCEDURE [dbo].[MyProc] AS BEGIN SET NOCOUNT ON; END') GO I found that code on this link How to check if a stored procedure exists before creating it. So I want something really similar for Pervasive. 回答1: There's no way to execute the IF NOT EXISTS

Most efficient way to select records in one database based on result set from totally different database

倖福魔咒の 提交于 2019-12-25 03:06:24
问题 I have 2 totally separate databases - one MSSQL and one Pervasive. Due to the way our product data is stored in the Pervasive database, you cannot easily run a query to get a products's information and features to display on our website. So, using a DTS package I take the product data from Pervasive and process it so it is one MSSQL table with the product item # (primary key for both databases) and all of the columns for the product features. Very easy and fast to query for our website. The

Different versions of PSQL when using DTO to get DB's names

烈酒焚心 提交于 2019-12-13 04:19:13
问题 I am working on an application, installed on windows OS, that connects to a Sage 50 (Peachtree) accounting software. The connection between the application and Sage is created using ODBC. To create the ODBC connection I am using the PSQL DTO lib to get the list of available databases. I obtained the lib from the PSQL SDK here - https://esd.actian.com/product/Zen_PSQL. I wanted to know if i need to worry about different versions of PSQL when using the DTO for the functionality of getting the

How to convert REAL48 float into a double

有些话、适合烂在心里 提交于 2019-12-12 16:13:57
问题 I am connecting to a Pervasive SQL database which splits some data over two fields. DOUBLE fields are actually split into fieldName_1 and fieldName_2 where _1 is a 2 byte int and _2 is a 4 byte int. I want to take these values and convert them using PHP into a usable value. I have some example code to do the conversion, but it is written in Delphi which I do not understand: { Reconstitutes a SmallInt and LongInt that form } { a Real into a double. } Function EntConvertInts (Const Int2 :

“Data source name not found” when adding linked server

冷暖自知 提交于 2019-12-12 02:25:50
问题 I am trying to add a linked server to a sql server 2012 database using ssms 2012. the linked server is pervasive sql. here's how i am trying to do it: EXEC sp_addlinkedserver @server = 'kslap208', @provider = 'MSDASQL', @datasrc = 'C003', @srvproduct = 'Pervasive' GO however when i test the connection i am getting this error msg: what am i doing wrong? how can i link to an instance of a pervasive sql database? here is some additional information regarding the DSN to which I am trying to