Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CREATING TABLES

Status
Not open for further replies.

madhatter2002

Programmer
Nov 6, 2002
73
PH
Hi again everyone...

just have a questin about SQL and VFP.. we have a SQL server, which is located overseas. I have been given access to this server and to a specific database in this server..

Question is, can I create Table in this server using VFP?? sorry, but I dont have any other database administering tools, i know that we can make remote views, but can we create tables remotely?? Or am i missing something with the CREATE TABLE - SQL command of VFP?
 
If you have Access to database so you can be able to connect to database with ODBC. Than you can use any of SQL commands like create table .....
 
Madhatter,

OK, you have solved the problem. But, for future reference and in case anyone else wants to know ...

Basically, you can do anything in VFP that the server allows you to do, by using SQL passthrough. Very briefly:

lnConn = SQLCONNECT("MyConnectionObject")
lcCmd = "CREATE TABLE MyTable (Field1 CHAR(4))"
SQLEXEC(lnConn,lcCmd)

lcCmd can contain any command which the server can understand.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top