Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql-DMO
Message
From
29/10/2004 11:26:48
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00955780
Message ID:
00955815
Views:
19
When executing codigo below it returns the following message:
Local oSQL As "SQLDMO.SQLServer",;
	oDatabase As "SQLDMO.Database",lcCmd as String

lcCmd = Thisform.edtSql.Value && Script SQL
If !Empty(lcCmd)
	Try
		oSQL = Createobject('SQLDMO.SQLServer')
		oSQL.Connect(<servidor>, <usuario>, <senha>)
		oDatabase = oSQL.Databases(_Screen.banco)

		lcMsg = ""
		oDatabase.ExecuteWithResultsAndMessages(lcCmd,, @lcMsg)
	Catch To oError
		=RotinaDeErro(oError)
	Finally
	Endtry
Endif
Mensage Error:
OLE IDispatch exception code 170 from Microsoft SQL-DMO (ODBC SQLState: 42000): [Microsoft][ODBC SQL Server Driver][SQL Server]Line 3: Incorrect syntax near 'GO'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 6: Incorrect syntax near 'GO'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 8: Incorrect syntax near 'GO'.
[Microsoft][ODBC SQL Server Driver][SQL Server]'CREATE VIEW' must be the first statement in a query batch.
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 21: Incorrect syntax near 'GO'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 23: Incorrect syntax near 'GO'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 25: Incorrect syntax near 'GO'...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform