Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote view connectivity
Message
From
02/05/2003 13:08:32
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00782903
Message ID:
00784214
Views:
23
I'm sorry, I have not connected to Access via odbc in some time. I don't know about creating the temporary database, in fact, I left that line in by mistake. To test a SQL connection, you could:
CLEAR
SET SAFETY OFF
SET TALK OFF
CLOSE DATABASES
CLOSE TABLES
#DEFINE MB_OKBUTTON 0
#DEFINE MB_STOPSIGNICON 16
LOCAL hConn
*Replace <servername> with the sQL servername
*Replace <databasename> with the SQL database
lnHan = SQLSTRINGCONNECT("Driver=SQL Server;Server=<servername>;Database=<databasename>;Trusted_Connection=No")
IF (lnHan < 0)
	LOCAL ARRAY laError[ 1]
	AERROR(laError)
	MESSAGEBOX( ;
		laError[ 2], ;
		MB_OKBUTTON + MB_STOPSIGNICON, ;
		"Error " + TRANSFORM(laError[ 5]))
ELSE
	WAIT WINDOW "SUccessfully connected!" NOWAIT
ENDIF

? lnHan
lnClose=SQLDISCONNECT(lnHan)
?lnClose
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform