Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View Definition: Line is Too Long error
Message
 
 
À
14/04/2005 22:28:27
Jill Derickson
Software Specialties
Saipan, CNMI
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01004947
Message ID:
01005082
Vues:
24
>it's only ~2,063 characters long!
>
>>Ok, try to simplify it and when put things back until it breaks again. I think the limit is ~8000+ chars.
>>
I would probably start with Glenn's suggestion. Also it would be great if Alexey would jump into this thread. As I said, I have the same error just recently in the following code:
wait window nowait "Updating RIDefinitions table. Please, wait..."
local llRIOpen, lnInsert, lnUpdate, lnDelete, ;
	lcParent, lcChild, lcParentTag, lcChildTag, ;
	lcParentExpr, lcChildExpr, oError, lnSelect, lcRITable
lnSelect = select()
llRIOpen = .t.
lcRITable = addbs(justpath(dbc()))+"RIDefinitions.dbf"
select 0
if not indbc("RIDefinitions","TABLE") && Table is not yet part of the database
	try
		create table (m.lcRITable) (ParentTB C(128), ;
			ChildTB C(128), ;
			ParentTag C(10), ;
			ChildTag C(10), ;
			ParentKey C(221), ;
			ChildKey C(221), ;
			InsTrigger I, ;
			UpdTrigger I, ;
			DelTrigger I)

		index on upper(ParentTB)  tag ParentTB additive
		index on upper(ChildTB)  tag ChildTB additive

	catch to oError when .t.

		=messagebox("Error in generating RIDefinitions table!" + chr(13) + ;
			oError.message + chr(13) + ;
			"Error #:" + transform(oError.ErrorNo) + chr(13) + ;
			"Line #:" + transform(oError.lineno) + chr(13) + ;
			"Error #:" + transform(oError.LineContents),48,"Error")
		llRIOpen = .f.
	endtry
else
	try
		use RIDefinitions exclusive
		zap
	catch
		llRIOpen = .f.
		=messagebox("There is a problem opening RIDefinitions table." + chr(13) + ;
			"Re-run RIBuilder later", 48, "Problem in RI builder")
	endtry
endif

if m.llRIOpen
	select riDD
	scan
		lnInsert = this.get_ri_char(dd_insert)
		lnUpdate = this.get_ri_char(dd_update)
		lnDelete = this.get_ri_char(dd_delete)

		if m.lnDelete = 0 and m.lnUpdate = 0 and m.lnInsert = 0
** then don't insert these records
		else
			lcParent = upper(alltrim(DD_Parent))
			lcChild = upper(alltrim(DD_Child))
			lcParentTag = upper(alltrim(DD_ParTag))
			lcChildTag = upper(alltrim(DD_ChiTag))
			lcParentExpr =	upper(alltrim(DD_ParExpr))
			lcChildExpr = upper(alltrim(DD_CHIEXPR))

			insert into RIDefinitions (ParentTB, ;
				ChildTB , ;
				ParentTag , ;
				ChildTag , ;
				ParentKey, ;
				ChildKey , ;
				InsTrigger , ;
				UpdTrigger , ;
				DelTrigger ) ;
				values ;
				(m.lcParent, m.lcChild, ;
				m.lcParentTag, m.lcChildTag, ;
				m.lcParentExpr, m.lcChildExpr, ;
				m.lnInsert, m.lnUpdate, m.lnDelete)
		endif
	endscan
	use in select('RIDefinitions') && Close the table
endif

select (m.lnSelect)
wait clear

return m.llRIOpen
In the Insert statement I had to switch to using variables (originally I had upper(alltrim() directly in the statement and I was getting the same error as you. I don't understand, why.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform