Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Type of column being changed in query
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Type of column being changed in query
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01355343
Message ID:
01355343
Vues:
66
I am doing a query via a cursor adapter into Sql Server. I have a table named systems that has a column sysid that is of type BIGINT. When I check my cursor after teh .Fill() below the column type on sysid is now C. In fact all my bigint columns are being converted to C. here is the code snippet any one knpw why this is happening? Is it becuase they are type BIGINT in Sql and Fox cannot interpret them?
loAdapter.DataSourceType = "ODBC"

lcConnString = "Driver=Sql Server;server=MYDESKTOP\SqlExpress;Integrated Security=True"

lnHandle = SQLSTRINGCONNECT( lcConnString )

SQLEXEC( lnHandle,  'use pcs' )

loAdapter.DataSource = lnHandle					

lcSelect = "SELECT sys.syscode , com.compipe, fac.facpoint,  " + ;
			"fin.finispdate, tpn.tpnps, tpn.tpncaseps, fin.finremarks, sys.sysid, com.comid, fac.facid, fin.finid, tpn.tpnid " + ;
			"FROM systems AS sys " + ;
			"INNER JOIN component AS com ON com.comsysid = sys.sysid INNER JOIN facility AS fac ON fac.faccomid = com.comid " + ;
			"INNER JOIN facinsp AS fin ON fin.finfacid = fac.facid " + ;
			"INNER JOIN tpinsp AS tpn ON tpn.tpnfinid = fin.finid "

loAdapter.SelectCmd = lcSelect

loAdapter.AllowInsert = .t.
loAdapter.AllowUpdate = .t.
loAdapter.AllowDelete = .t.
loAdapter.BufferModeOverride = 5  && buffering
loAdapter.FetchMemo = .t.
loAdapter.FetchAsNeeded = .t.
loAdapter.FetchSize = 200
loAdapter.SendUpdates = .t.

loAdapter.Tables = "systems, component, facility, facinsp, tpinsp"
loAdapter.KeyFieldList = "sysid, comid, facid, finid, tpnid"
loAdapter.UpdateNameList = "syscode systems.syscode, compipe component.compipe, facpoint facility.facpoint, finispdate " + ;
								"facinsp.finispdate, tpnps tpinsp.tpnps, tpncaseps tpinsp.tpncaseps, finremarks facinsp.finremarks, tpnid tpinsp.tpnid"
loAdapter.UpdatableFieldList =  "syscode , compipe , facpoint, finispdate, tpnps, tpncaseps, finremarks, tpnid"

IF lnHandle < 0
	AERROR( laError )
ELSE  


	* remove when in production
	lcError = ON( "ERROR" )
	ON ERROR llError = .t.

	USE IN SELECT( loAdapter.Alias )

	llFill = loAdapter.CursorFill( .f., .f. )
... more code but here is where the types are changing
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform