🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1880

Re: HELP! How to run SQL script in C++Builder Program

#1880
From: nikoly
Date: Mon, 21 Dec 1998 00:00
29 lines
1147 bytes

winprise <winprise@163.net> �������� � ������
<75dgcp$1dd13@forums.borland.com>...
> Hi! how do you do
>    How can I run a InterBase SQL script like
> "CreateTable.sql" in C++Builder Program.
> 
> 
> 
> 
> 
> 
> 

Hi winprise.

First you must create a TQuery.
Next, assign a SQL property of this query a string list withs your SQL text
Next execute a method ExecSQL of this Query.
Note, what you must disable a table schema cache in your BDE ALIAS.
like SCHEMA CACHE SIZE=0

for example:

TQuery *Query = new TQuery(0);
Query->SQL->Add("CREATE TABLE TEST (FIELD1 INTEGER,FIELD2 INTEGER)");
Query->ExecSQL();
delete Query;
Technical Details
Message-ID: <01be2cf5$28657520$75c09ec2@intermec>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <75dgcp$1dd13@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: fcd2b,ae055b32f3111ea9
X-Google-Attributes: gidfcd2b,public
From: "nikoly" <nikolyv@usa.net>
Subject: Re: HELP! How to run SQL script in C++Builder Program
Date: 1998/12/21
Message-ID: <01be2cf5$28657520$75c09ec2@intermec>
X-Deja-AN: 424510755
References: <75dgcp$1dd13@forums.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.cppbuilder.database.multi-tier