Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seen a GOOD CA lately?
Message
From
25/01/2005 16:01:32
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Seen a GOOD CA lately?
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
00980530
Message ID:
00980530
Views:
53
OK, I give up! What am I missing? I have a databasse on a remote SQL Server which I am trying to query using a CA. I created a CA class in a classlibrary, and subsequently used the builder to configure the class for use. When I do use it, there seems to be problems when mapping the SQL data to a VFP cursor. I have tried with both UseCursorSchema True and False. Still "No Cigar"

The class definition is a s follows:
DEFINE CLASS cl AS cursoradapter
	Tag = "DRIVER=SQL Server;Server=BOGUSSERVER;UID=glenn;PWD=BOGUS;APP=Microsoft Visual FoxPro;WSID=GLENNLT;DATABASE=Anthologyclient;Trusted_Connection=Yes;"
	Height = 22
	Width = 23
	SelectCmd = "select 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 5, 6, 7, 8, 9, AB, CTD, DA, DE, EB, EscIDC, IDC, LastCCIDC, NoOfCC, PriCC, SupHrsIDC, TA, TE from CL"
	CursorSchema = "EXP I, EXP1 I, EXP2 I, EXP3 I, EXP4 I, EXP5 I, EXP6 I, EXP7 I, EXP8 I, EXP9 I, EXP10 I, EXP11 I, EXP12 I, EXP13 I, EXP14 I, EXP15 I, EXP16 I, EXP17 I, EXP18 I, EXP19 I, EXP20 I, EXP21 I, EXP22 I, EXP23 I, EXP24 I, EXP25 I, EXP26 I, EXP27 I, EXP28 I, EXP29 I, EXP30 I, EXP31 I, EXP32 I, EXP33 I, EXP34 I, EXP35 I, EXP36 I, EXP37 I, EXP38 I, EXP39 I, EXP40 I, EXP41 I, EXP42 I, EXP43 I, EXP44 I, EXP45 I, EXP46 I, EXP47 I, AB C(20), CTD I, DA T, DE T, EB C(20), ESCIDC I, IDC I, LASTCCIDC I, NOOFCC I, PRICC I, SUPHRSIDC I, TA T, TE T"
	Alias = "customers"
	DataSourceType = "ODBC"
	Flags = 0
	FetchAsNeeded = .T.
	KeyFieldList = ""
	Tables = "CL"
	UpdatableFieldList = ""
	UpdateNameList = ""
	AllowSimultaneousFetch = .T.
	MapVarchar = .T.
	MapBinary = .T.
	UseCursorSchema = .T
	Name = "cl"


	PROCEDURE Init
		*** Setup code: DO NOT REMOVE
		local llReturn
		do case
			case not pemstatus(This, '__VFPSetup', 5)
				This.AddProperty('__VFPSetup', 0)
			case This.__VFPSetup = 1
				This.__VFPSetup = 2
			case This.__VFPSetup = 2
				This.__VFPSetup = 0
				return
		endcase
		set multilocks on
		llReturn = dodefault()
		*** End of Setup code: DO NOT REMOVE
		*** Select connection code: DO NOT REMOVE

		***<DataSource>
		This.DataSource = sqlstringconnect([DRIVER=SQL Server;Server=64.68.235.97;UID=glenn;PWD=medo1;APP=Microsoft Vi] + ;
			[sual FoxPro;WSID=GLENNLT;DATABASE=Anthologyclient;Trusted_Connection=Yes;])
		***</DataSource>
		*** End of Select connection code: DO NOT REMOVE

		*** Setup code: DO NOT REMOVE
		if This.__VFPSetup = 1
			This.__VFPSetup = 2
		endif
		return llReturn
		*** End of Setup code: DO NOT REMOVE
	ENDPROC


	PROCEDURE AutoOpen
		*** Setup code: DO NOT REMOVE
		if not pemstatus(This, '__VFPSetup', 5)
			This.AddProperty('__VFPSetup', 1)
			This.Init()
		endif
		*** End of Setup code: DO NOT REMOVE
	ENDPROC


ENDDEFINE
*
*-- EndDefine: cl
**************************************************
The field names are NOT mone. This is a database from a third party which I need to access, so please no comments about my stupid field names, I know they are stupid.

Thanks

Glenn
Next
Reply
Map
View

Click here to load this message in the networking platform