Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send a big string to sqlexec
Message
From
20/08/2007 00:33:25
 
 
To
19/08/2007 23:19:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01249060
Message ID:
01249068
Views:
17
>I want to send a bing string to sqlexec (creating a SP or a new Database creation command). How do I send it to sqlexec.
>
>Rajesh
Like this.
lcQuery = ""
TEXT TO lcQuery TEXTMERGE NOSHOW 
	CREATE TABLE  `inmates`.`inmates`
		(`In_ID` INT AUTO_INCREMENT PRIMARY KEY ,
		`In_DOC_Number` DECIMAL(6,0) NOT NULL DEFAULT 0,
		`In_Last_Name` CHAR(17) NOT NULL DEFAULT '',
		`In_First_Name` CHAR(15) NOT NULL DEFAULT '',
		`In_Mi_Name` CHAR(1) NOT NULL DEFAULT '',
		`In_Suffix_Name` CHAR(4) NOT NULL DEFAULT '',
		`In_Race` CHAR(1) NOT NULL DEFAULT '',
		`In_Sex` CHAR(1) NOT NULL DEFAULT '',
		`In_When` CHAR(14) NOT NULL DEFAULT '',
		`In_Where` CHAR(15) NOT NULL DEFAULT '',
		`In_Who` CHAR(15) NOT NULL DEFAULT '',
		`In_Arrival_Date` DATE NOT NULL ,
		`In_Supr_Lvl` CHAR(10) NOT NULL DEFAULT '',
		`In_Ed_Id` INTEGER UNSIGNED NOT NULL DEFAULT 0,
		`In_Bd_Id` INTEGER UNSIGNED NOT NULL DEFAULT 0,
		`In_Jb_Id` INTEGER UNSIGNED NOT NULL DEFAULT 0,
		`In_Lo_Id` INTEGER UNSIGNED NOT NULL DEFAULT 0,
		`In_Deleted` BIT NOT NULL DEFAULT 0,
		`Ms_Last_Test` DATE NOT NULL DEFAULT '0000-00-00',
		`Ms_Last_Recheck` DATE NOT NULL DEFAULT '0000-00-00',
		`Ms_PPD` BIT NOT NULL DEFAULT 0,
		`Ms_HEPA` BIT NOT NULL DEFAULT 0,
		`Ms_HEPB` BIT NOT NULL DEFAULT 0,
		`Ms_HEPC` BIT NOT NULL DEFAULT 0,
		`Ms_RPR` BIT NOT NULL DEFAULT 0,
		`Ms_HIV` BIT NOT NULL DEFAULT 0,
		`Ms_Duty_Status` BIT NOT NULL DEFAULT 0,
		`Ms_Sports_Status` BIT NOT NULL DEFAULT 0,
		`Ms_LOC` CHAR(1) NOT NULL DEFAULT '',
		`Ms_Diabetic` BIT NOT NULL DEFAULT 0,
		`Ms_Insulin` BIT NOT NULL DEFAULT 0,
		`Ms_HyperTension` BIT NOT NULL DEFAULT 0,
		`Ms_Seizures` BIT NOT NULL DEFAULT 0,
		`Ms_MentalHealth` BIT NOT NULL DEFAULT 0,
		`Cl_Comment` CHAR(254) NOT NULL DEFAULT '',
		`Cl_Recall` DATE NOT NULL DEFAULT '0000-00-00',
		`Cl_When` CHAR(14) NOT NULL DEFAULT '',
		`Cl_Where` CHAR(15) NOT NULL DEFAULT '',
		`Cl_Who` CHAR(15) NOT NULL DEFAULT '',
		`Cl_em_id` INT NOT NULL DEFAULT 0
		);
ENDTEXT 
IF SQLEXEC(_Screen.Connection,lcQuery) < 0
	MESSAGEBOX("SQL error:"+lcQuery)
ENDIF 
Previous
Reply
Map
View

Click here to load this message in the networking platform