>Hello All !
>I have client/server application (SQL Server and VFP8)
>I used to work with remove views and now trying to work with SQL Pass Through technique.
>I have DSN “sql_conn1”, which works with views.
>Now I’m trying to use the same DSN for SPT like this:
>Create new form:
>Form1:Load:
>#define MB_OKBUTTON 0
>#define MB_STOPSIGNICON 16
>
>public gcConn
>gcConn=SQLCONNECT("sql_conn1","ServerName/UserName","")
>IF (lcConn < 0)
> LOCAL ARRAY laError[1]
> AERROR(laError)
> MESSAGEBOX(laError[2],;
> MB_OKBUTTON+MB_STOPSIGNICON,;
> "Error "+TRANSFORM(laError[5]))
>ELSE
> MESSAGEBOX("OK")
>ENDIF
>*********************
>Everything works fine. I create stored procedures, call them, execute them , fine.
>But when I decide to put this form into my project and call it from the menu, I got error message
>Connectivity error:[Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified.
Hi Marina,
There seems to be a typo in the code. You define gcConn, but check lcConn. I don't know, if you posted the exact code or not and if this is relevant...
If it's not broken, fix it until it is.
My Blog