Problems in connecting Visual foxpro 8 with a free table on a remote server  
Author Message
sana ul haq





PostPosted: Visual FoxPro General, Problems in connecting Visual foxpro 8 with a free table on a remote server Top

Hello everyone

I am having a problem when i m trying to connect to a remote server from a local machine.

I have a visual foxpro free table named as items.dbf on a directory called foxpro on my remote server.

I have a simple connection form which is checking the connection with the remote server. the coding on this form is as follow:

lcDbfDir = [ http://www.hide-link.com/ ~mglobe/foxpro/]

lcCon = [Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=] + lcDbfDir + [;Exclusive=No;NULL=NO;BACKGROUNDFETCH=NO;DELETED=NO]

lh = SQLStringConnect( lcCon )

if lh>0 then

= MESSAGEBOX('Connection made', 48, 'SQL Connect Message')

else

= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')

Aerror(arrWhy)

Display Memo Like arrWhy

ENDIF

SQLTables(lh)

Browse

SQLExec( lh, "select * from items" )

SqlResult.source

now when I run this program on my local machine while connected to the internet it gives me this error message:

Connection Handle is invalid

Connectivity error: [Microsoft][ODBC Visual foxpro Drivers] Fox Error 1[Microsoft][ODBC Visual foxpro Drivers] Driver's SQLGetConnectedAttr failed

I am trying to fix this problem but really donno what to do




Visual FoxPro1  
 
 
CetinBasoz





PostPosted: Visual FoxPro General, Problems in connecting Visual foxpro 8 with a free table on a remote server Top

Probably there is a problem with this message. This is the 3rd time I'm trying to reply since you posted it, hope works this time.

Can you browse that folder if you put that "http://72.29.68.136/~mglobe/foxpro/" in explorer adress bar


 
 
sana ul haq





PostPosted: Visual FoxPro General, Problems in connecting Visual foxpro 8 with a free table on a remote server Top

yes sir it is working fine even u can check it urself it is working perfectly. but when i run this it gives me the error which i have mentioned.

please check it urself if that doesnt work

http://pos-microglobe.com/foxpro/

 



 
 
CetinBasoz





PostPosted: Visual FoxPro General, Problems in connecting Visual foxpro 8 with a free table on a remote server Top

OK I see. Unfortunately I don't know the correct connection string for ADO (I tried URL property but got "Multiple step ..." error and have no time to check if there is one working.

You migth use UrlDownLoadToFile API and open downloaded temp file.