VFP8 SQLConnect() bug 
Author Message
 VFP8 SQLConnect() bug

lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

This works in VFP5, VFP6 and VFP7, but it does NOT work in VFP8. The error
is:

'Function argument value, type, or count is invalid'

The docs don't indicate any significant changes, I'm thinking this might
just be a bug on VFP8, or maybe a change that is not in the docs? Which ever
the case, this is potentially bad as it can break code the was used in
previous verison of VFP. Can anyone else confirm this?



Mon, 25 Apr 2005 07:27:42 GMT  
 VFP8 SQLConnect() bug
Ook Mon -
grrrrrrrrrrrr... you have it formatted correctly...
ok ok ..  try double quotes - same result?  try [] bracket thingies - same
result?
beaten, and beats me.... mondo regards [Bill]

--
=============================[remove the dot bob to reply]
William Sanders, Electronic Filing Group. MSDN ISV - VFP/SQL .  mySql/ Sql /
Oracle with VFP - YUP!!
972.394.7261 / GoTo China and teach C/SaPPdEV on occasion.
http://window.to/vfoxpro


Quote:
> lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> This works in VFP5, VFP6 and VFP7, but it does NOT work in VFP8. The error
> is:

> 'Function argument value, type, or count is invalid'

> The docs don't indicate any significant changes, I'm thinking this might
> just be a bug on VFP8, or maybe a change that is not in the docs? Which
ever
> the case, this is potentially bad as it can break code the was used in
> previous verison of VFP. Can anyone else confirm this?



Mon, 25 Apr 2005 12:30:15 GMT  
 VFP8 SQLConnect() bug
Hi!

I just did following:
- created ODBC data source
- ran command in the command window:
nn = SQLConnect('ttt','sa','')

It is working ok as expected. Maybe, something in ODBC data source? I used
SQL Server 2000 database engine (MSDE 2000).

Also, there is a new parameter for SQLConnect. It is possible it spoils
something. Go figure...

--
WBR,
Vlad Grynchyshyn, Developer, MCP



Quote:
> lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> This works in VFP5, VFP6 and VFP7, but it does NOT work in VFP8. The error
> is:

> 'Function argument value, type, or count is invalid'

> The docs don't indicate any significant changes, I'm thinking this might
> just be a bug on VFP8, or maybe a change that is not in the docs? Which
ever
> the case, this is potentially bad as it can break code the was used in
> previous verison of VFP. Can anyone else confirm this?



Mon, 25 Apr 2005 16:31:20 GMT  
 VFP8 SQLConnect() bug
Very interesting indeed! I'm also using SQL Server 2000 database engine
(MSDE 2000). I do this:

CREATE DATABASE TEMP
CREATE CONNECTION TEMP2 DATASOURCE MSSQL_OOK USERID SA
AA=SQLCONNECT( 'TEMP2','SA','')

And I get 'Function argument value, type, or count is invalid'.

I do this:

AA=SQLCONNECT( 'TEMP2','SA')

and it works. What ODBC driver version are you using? I'm using
2000.81.7713.00. What is also interesting is that I get the exact same
results using two different versions of the MySQL odbc drivers. I tend to
think that this isn't an odbc driver issue, as it does the same with three
different drivers into 2 different sql databases. I then tried it using the
VFP ODBC driver - exact same thing.

OK, it works for you, gives an error for me. What else could cause this to
happen? What version of VFP are you testing this in? I'm using VFP8 beta,
the public download that became available 2 days ago.


Quote:
> Hi!

> I just did following:
> - created ODBC data source
> - ran command in the command window:
> nn = SQLConnect('ttt','sa','')

> It is working ok as expected. Maybe, something in ODBC data source? I used
> SQL Server 2000 database engine (MSDE 2000).

> Also, there is a new parameter for SQLConnect. It is possible it spoils
> something. Go figure...

> --
> WBR,
> Vlad Grynchyshyn, Developer, MCP



> > lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> > This works in VFP5, VFP6 and VFP7, but it does NOT work in VFP8. The
error
> > is:

> > 'Function argument value, type, or count is invalid'

> > The docs don't indicate any significant changes, I'm thinking this might
> > just be a bug on VFP8, or maybe a change that is not in the docs? Which
> ever
> > the case, this is potentially bad as it can break code the was used in
> > previous verison of VFP. Can anyone else confirm this?



Tue, 26 Apr 2005 01:11:21 GMT  
 VFP8 SQLConnect() bug
Hi!

Hej, Ook, did you read SQLConnect() docummentation accurately? First
parameter of SQLConnect() is not a Connection name from VFP database. It is
ODBC Data Source name. Go to Control Panel -> Administrative Tools -> Data
Sources (ODBC). Create it there. Then use it in VFP. No CONNECTION object in
VFP database is required for such case.

--
WBR,
Vlad Grynchyshyn, Developer, MCP



Quote:
> Very interesting indeed! I'm also using SQL Server 2000 database engine
> (MSDE 2000). I do this:

> CREATE DATABASE TEMP
> CREATE CONNECTION TEMP2 DATASOURCE MSSQL_OOK USERID SA
> AA=SQLCONNECT( 'TEMP2','SA','')

> And I get 'Function argument value, type, or count is invalid'.

> I do this:

> AA=SQLCONNECT( 'TEMP2','SA')

> and it works. What ODBC driver version are you using? I'm using
> 2000.81.7713.00. What is also interesting is that I get the exact same
> results using two different versions of the MySQL odbc drivers. I tend to
> think that this isn't an odbc driver issue, as it does the same with three
> different drivers into 2 different sql databases. I then tried it using
the
> VFP ODBC driver - exact same thing.

> OK, it works for you, gives an error for me. What else could cause this to
> happen? What version of VFP are you testing this in? I'm using VFP8 beta,
> the public download that became available 2 days ago.



> > Hi!

> > I just did following:
> > - created ODBC data source
> > - ran command in the command window:
> > nn = SQLConnect('ttt','sa','')

> > It is working ok as expected. Maybe, something in ODBC data source? I
used
> > SQL Server 2000 database engine (MSDE 2000).

> > Also, there is a new parameter for SQLConnect. It is possible it spoils
> > something. Go figure...

> > --
> > WBR,
> > Vlad Grynchyshyn, Developer, MCP



> > > lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> > > This works in VFP5, VFP6 and VFP7, but it does NOT work in VFP8. The
> error
> > > is:

> > > 'Function argument value, type, or count is invalid'

> > > The docs don't indicate any significant changes, I'm thinking this
might
> > > just be a bug on VFP8, or maybe a change that is not in the docs?
Which
> > ever
> > > the case, this is potentially bad as it can break code the was used in
> > > previous verison of VFP. Can anyone else confirm this?



Tue, 26 Apr 2005 19:28:44 GMT  
 VFP8 SQLConnect() bug
This function also works if you use the name of a connection from the
current database. It appears that this is either an undocumented/unsupported
feature, or an ommision in the documentation. More important, this worked
with VFP6-7, but DOES NOT work with VFP8. If anyone did this in previous
versions of VFP, they will find their code to be broken in VFP8. I've sent a
note to to the VS Docs people about this, maybe they will update the
documentation before VFP8 final ships.

FWIW, I've always used a connection name with this function, I've never used
an ODBC data source name, and it has always worked. When you create a
connection in a database, you can provide userid/password so that when you
connect to it with SQLCONNECT, you just do this:

handle = SQLCONNECT( <database connection name>) and this works quite well.

What has changed is the error when trying to pass the third parameter when
no password is needed - this is something that worked in previous versions
but no longer does. I'm sure that several people will be quick to comment
that this shouldn't be done this way, and they may very well be correct. But
it still breaks code that used to work.


Quote:
> Hi!

> Hej, Ook, did you read SQLConnect() docummentation accurately? First
> parameter of SQLConnect() is not a Connection name from VFP database. It
is
> ODBC Data Source name. Go to Control Panel -> Administrative Tools -> Data
> Sources (ODBC). Create it there. Then use it in VFP. No CONNECTION object
in
> VFP database is required for such case.

> --
> WBR,
> Vlad Grynchyshyn, Developer, MCP



> > Very interesting indeed! I'm also using SQL Server 2000 database engine
> > (MSDE 2000). I do this:

> > CREATE DATABASE TEMP
> > CREATE CONNECTION TEMP2 DATASOURCE MSSQL_OOK USERID SA
> > AA=SQLCONNECT( 'TEMP2','SA','')

> > And I get 'Function argument value, type, or count is invalid'.

> > I do this:

> > AA=SQLCONNECT( 'TEMP2','SA')

> > and it works. What ODBC driver version are you using? I'm using
> > 2000.81.7713.00. What is also interesting is that I get the exact same
> > results using two different versions of the MySQL odbc drivers. I tend
to
> > think that this isn't an odbc driver issue, as it does the same with
three
> > different drivers into 2 different sql databases. I then tried it using
> the
> > VFP ODBC driver - exact same thing.

> > OK, it works for you, gives an error for me. What else could cause this
to
> > happen? What version of VFP are you testing this in? I'm using VFP8
beta,
> > the public download that became available 2 days ago.



> > > Hi!

> > > I just did following:
> > > - created ODBC data source
> > > - ran command in the command window:
> > > nn = SQLConnect('ttt','sa','')

> > > It is working ok as expected. Maybe, something in ODBC data source? I
> used
> > > SQL Server 2000 database engine (MSDE 2000).

> > > Also, there is a new parameter for SQLConnect. It is possible it
spoils
> > > something. Go figure...

> > > --
> > > WBR,
> > > Vlad Grynchyshyn, Developer, MCP



> > > > lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> > > > This works in VFP5, VFP6 and VFP7, but it does NOT work in VFP8. The
> > error
> > > > is:

> > > > 'Function argument value, type, or count is invalid'

> > > > The docs don't indicate any significant changes, I'm thinking this
> might
> > > > just be a bug on VFP8, or maybe a change that is not in the docs?
> Which
> > > ever
> > > > the case, this is potentially bad as it can break code the was used
in
> > > > previous verison of VFP. Can anyone else confirm this?



Wed, 27 Apr 2005 02:02:14 GMT  
 VFP8 SQLConnect() bug
Hi!

Well, personally, I did not know it worked that way in VFP6-7, exactly
because docummentation.

Quote:
> it still breaks code that used to work.

Code that was made based on undocummented feature is not supported by
Microsoft. When it is undocummented, there were probably certain reasons for
that, is it right? :-)

I can send this to MS as a bug-report for VFP8 beta, but there is a litlle
chance it will be fixed. Send it?

--
WBR,
Vlad Grynchyshyn, Developer, MCP



Quote:
> This function also works if you use the name of a connection from the
> current database. It appears that this is either an

undocumented/unsupported
Quote:
> feature, or an ommision in the documentation. More important, this worked
> with VFP6-7, but DOES NOT work with VFP8. If anyone did this in previous
> versions of VFP, they will find their code to be broken in VFP8. I've sent
a
> note to to the VS Docs people about this, maybe they will update the
> documentation before VFP8 final ships.

> FWIW, I've always used a connection name with this function, I've never
used
> an ODBC data source name, and it has always worked. When you create a
> connection in a database, you can provide userid/password so that when you
> connect to it with SQLCONNECT, you just do this:

> handle = SQLCONNECT( <database connection name>) and this works quite
well.

> What has changed is the error when trying to pass the third parameter when
> no password is needed - this is something that worked in previous versions
> but no longer does. I'm sure that several people will be quick to comment
> that this shouldn't be done this way, and they may very well be correct.
But
> it still breaks code that used to work.



> > Hi!

> > Hej, Ook, did you read SQLConnect() docummentation accurately? First
> > parameter of SQLConnect() is not a Connection name from VFP database. It
> is
> > ODBC Data Source name. Go to Control Panel -> Administrative Tools ->
Data
> > Sources (ODBC). Create it there. Then use it in VFP. No CONNECTION
object
> in
> > VFP database is required for such case.

> > --
> > WBR,
> > Vlad Grynchyshyn, Developer, MCP



> > > Very interesting indeed! I'm also using SQL Server 2000 database
engine
> > > (MSDE 2000). I do this:

> > > CREATE DATABASE TEMP
> > > CREATE CONNECTION TEMP2 DATASOURCE MSSQL_OOK USERID SA
> > > AA=SQLCONNECT( 'TEMP2','SA','')

> > > And I get 'Function argument value, type, or count is invalid'.

> > > I do this:

> > > AA=SQLCONNECT( 'TEMP2','SA')

> > > and it works. What ODBC driver version are you using? I'm using
> > > 2000.81.7713.00. What is also interesting is that I get the exact same
> > > results using two different versions of the MySQL odbc drivers. I tend
> to
> > > think that this isn't an odbc driver issue, as it does the same with
> three
> > > different drivers into 2 different sql databases. I then tried it
using
> > the
> > > VFP ODBC driver - exact same thing.

> > > OK, it works for you, gives an error for me. What else could cause
this
> to
> > > happen? What version of VFP are you testing this in? I'm using VFP8
> beta,
> > > the public download that became available 2 days ago.



> > > > Hi!

> > > > I just did following:
> > > > - created ODBC data source
> > > > - ran command in the command window:
> > > > nn = SQLConnect('ttt','sa','')

> > > > It is working ok as expected. Maybe, something in ODBC data source?
I
> > used
> > > > SQL Server 2000 database engine (MSDE 2000).

> > > > Also, there is a new parameter for SQLConnect. It is possible it
> spoils
> > > > something. Go figure...

> > > > --
> > > > WBR,
> > > > Vlad Grynchyshyn, Developer, MCP



> > > > > lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> > > > > This works in VFP5, VFP6 and VFP7, but it does NOT work in VFP8.
The
> > > error
> > > > > is:

> > > > > 'Function argument value, type, or count is invalid'

> > > > > The docs don't indicate any significant changes, I'm thinking this
> > might
> > > > > just be a bug on VFP8, or maybe a change that is not in the docs?
> > Which
> > > > ever
> > > > > the case, this is potentially bad as it can break code the was
used
> in
> > > > > previous verison of VFP. Can anyone else confirm this?



Sat, 30 Apr 2005 21:57:59 GMT  
 VFP8 SQLConnect() bug
Hi!

Quote:
> Well, personally, I did not know it worked that way in VFP6-7, exactly
> because docummentation.

I meant, that is is possible also specify user name and password when
connecting such way (in VFP7's docummentation this was not an option).

--
WBR,
Vlad Grynchyshyn, Developer, MCP


Quote:
> Hi!

> Well, personally, I did not know it worked that way in VFP6-7, exactly
> because docummentation.

> > it still breaks code that used to work.

> Code that was made based on undocummented feature is not supported by
> Microsoft. When it is undocummented, there were probably certain reasons
for
> that, is it right? :-)

> I can send this to MS as a bug-report for VFP8 beta, but there is a litlle
> chance it will be fixed. Send it?

> --
> WBR,
> Vlad Grynchyshyn, Developer, MCP



> > This function also works if you use the name of a connection from the
> > current database. It appears that this is either an
> undocumented/unsupported
> > feature, or an ommision in the documentation. More important, this
worked
> > with VFP6-7, but DOES NOT work with VFP8. If anyone did this in previous
> > versions of VFP, they will find their code to be broken in VFP8. I've
sent
> a
> > note to to the VS Docs people about this, maybe they will update the
> > documentation before VFP8 final ships.

> > FWIW, I've always used a connection name with this function, I've never
> used
> > an ODBC data source name, and it has always worked. When you create a
> > connection in a database, you can provide userid/password so that when
you
> > connect to it with SQLCONNECT, you just do this:

> > handle = SQLCONNECT( <database connection name>) and this works quite
> well.

> > What has changed is the error when trying to pass the third parameter
when
> > no password is needed - this is something that worked in previous
versions
> > but no longer does. I'm sure that several people will be quick to
comment
> > that this shouldn't be done this way, and they may very well be correct.
> But
> > it still breaks code that used to work.



> > > Hi!

> > > Hej, Ook, did you read SQLConnect() docummentation accurately? First
> > > parameter of SQLConnect() is not a Connection name from VFP database.
It
> > is
> > > ODBC Data Source name. Go to Control Panel -> Administrative Tools ->
> Data
> > > Sources (ODBC). Create it there. Then use it in VFP. No CONNECTION
> object
> > in
> > > VFP database is required for such case.

> > > --
> > > WBR,
> > > Vlad Grynchyshyn, Developer, MCP



> > > > Very interesting indeed! I'm also using SQL Server 2000 database
> engine
> > > > (MSDE 2000). I do this:

> > > > CREATE DATABASE TEMP
> > > > CREATE CONNECTION TEMP2 DATASOURCE MSSQL_OOK USERID SA
> > > > AA=SQLCONNECT( 'TEMP2','SA','')

> > > > And I get 'Function argument value, type, or count is invalid'.

> > > > I do this:

> > > > AA=SQLCONNECT( 'TEMP2','SA')

> > > > and it works. What ODBC driver version are you using? I'm using
> > > > 2000.81.7713.00. What is also interesting is that I get the exact
same
> > > > results using two different versions of the MySQL odbc drivers. I
tend
> > to
> > > > think that this isn't an odbc driver issue, as it does the same with
> > three
> > > > different drivers into 2 different sql databases. I then tried it
> using
> > > the
> > > > VFP ODBC driver - exact same thing.

> > > > OK, it works for you, gives an error for me. What else could cause
> this
> > to
> > > > happen? What version of VFP are you testing this in? I'm using VFP8
> > beta,
> > > > the public download that became available 2 days ago.



> > > > > Hi!

> > > > > I just did following:
> > > > > - created ODBC data source
> > > > > - ran command in the command window:
> > > > > nn = SQLConnect('ttt','sa','')

> > > > > It is working ok as expected. Maybe, something in ODBC data
source?
> I
> > > used
> > > > > SQL Server 2000 database engine (MSDE 2000).

> > > > > Also, there is a new parameter for SQLConnect. It is possible it
> > spoils
> > > > > something. Go figure...

> > > > > --
> > > > > WBR,
> > > > > Vlad Grynchyshyn, Developer, MCP



> > > > > > lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> > > > > > This works in VFP5, VFP6 and VFP7, but it does NOT work in VFP8.
> The
> > > > error
> > > > > > is:

> > > > > > 'Function argument value, type, or count is invalid'

> > > > > > The docs don't indicate any significant changes, I'm thinking
this
> > > might
> > > > > > just be a bug on VFP8, or maybe a change that is not in the
docs?
> > > Which
> > > > > ever
> > > > > > the case, this is potentially bad as it can break code the was
> used
> > in
> > > > > > previous verison of VFP. Can anyone else confirm this?



Sat, 30 Apr 2005 23:01:00 GMT  
 VFP8 SQLConnect() bug
Send it if you can. Microsoft should either fix the documentation so that
this feature is documented, or they should remove it so that it no longer
works. An undocumented feature like this that works, and works well, can
cause a lot of problems when they change it. I've always done this and I
thought it was a documented feature. I can't be the only one. Nor will be
the only one who's code will be broken by this change, especially if
Microsofts removes the feature.


Quote:
> Hi!

> Well, personally, I did not know it worked that way in VFP6-7, exactly
> because docummentation.

> > it still breaks code that used to work.

> Code that was made based on undocummented feature is not supported by
> Microsoft. When it is undocummented, there were probably certain reasons
for
> that, is it right? :-)

> I can send this to MS as a bug-report for VFP8 beta, but there is a litlle
> chance it will be fixed. Send it?

> --
> WBR,
> Vlad Grynchyshyn, Developer, MCP



> > This function also works if you use the name of a connection from the
> > current database. It appears that this is either an
> undocumented/unsupported
> > feature, or an ommision in the documentation. More important, this
worked
> > with VFP6-7, but DOES NOT work with VFP8. If anyone did this in previous
> > versions of VFP, they will find their code to be broken in VFP8. I've
sent
> a
> > note to to the VS Docs people about this, maybe they will update the
> > documentation before VFP8 final ships.

> > FWIW, I've always used a connection name with this function, I've never
> used
> > an ODBC data source name, and it has always worked. When you create a
> > connection in a database, you can provide userid/password so that when
you
> > connect to it with SQLCONNECT, you just do this:

> > handle = SQLCONNECT( <database connection name>) and this works quite
> well.

> > What has changed is the error when trying to pass the third parameter
when
> > no password is needed - this is something that worked in previous
versions
> > but no longer does. I'm sure that several people will be quick to
comment
> > that this shouldn't be done this way, and they may very well be correct.
> But
> > it still breaks code that used to work.



> > > Hi!

> > > Hej, Ook, did you read SQLConnect() docummentation accurately? First
> > > parameter of SQLConnect() is not a Connection name from VFP database.
It
> > is
> > > ODBC Data Source name. Go to Control Panel -> Administrative Tools ->
> Data
> > > Sources (ODBC). Create it there. Then use it in VFP. No CONNECTION
> object
> > in
> > > VFP database is required for such case.

> > > --
> > > WBR,
> > > Vlad Grynchyshyn, Developer, MCP



> > > > Very interesting indeed! I'm also using SQL Server 2000 database
> engine
> > > > (MSDE 2000). I do this:

> > > > CREATE DATABASE TEMP
> > > > CREATE CONNECTION TEMP2 DATASOURCE MSSQL_OOK USERID SA
> > > > AA=SQLCONNECT( 'TEMP2','SA','')

> > > > And I get 'Function argument value, type, or count is invalid'.

> > > > I do this:

> > > > AA=SQLCONNECT( 'TEMP2','SA')

> > > > and it works. What ODBC driver version are you using? I'm using
> > > > 2000.81.7713.00. What is also interesting is that I get the exact
same
> > > > results using two different versions of the MySQL odbc drivers. I
tend
> > to
> > > > think that this isn't an odbc driver issue, as it does the same with
> > three
> > > > different drivers into 2 different sql databases. I then tried it
> using
> > > the
> > > > VFP ODBC driver - exact same thing.

> > > > OK, it works for you, gives an error for me. What else could cause
> this
> > to
> > > > happen? What version of VFP are you testing this in? I'm using VFP8
> > beta,
> > > > the public download that became available 2 days ago.



> > > > > Hi!

> > > > > I just did following:
> > > > > - created ODBC data source
> > > > > - ran command in the command window:
> > > > > nn = SQLConnect('ttt','sa','')

> > > > > It is working ok as expected. Maybe, something in ODBC data
source?
> I
> > > used
> > > > > SQL Server 2000 database engine (MSDE 2000).

> > > > > Also, there is a new parameter for SQLConnect. It is possible it
> > spoils
> > > > > something. Go figure...

> > > > > --
> > > > > WBR,
> > > > > Vlad Grynchyshyn, Developer, MCP



> > > > > > lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> > > > > > This works in VFP5, VFP6 and VFP7, but it does NOT work in VFP8.
> The
> > > > error
> > > > > > is:

> > > > > > 'Function argument value, type, or count is invalid'

> > > > > > The docs don't indicate any significant changes, I'm thinking
this
> > > might
> > > > > > just be a bug on VFP8, or maybe a change that is not in the
docs?
> > > Which
> > > > > ever
> > > > > > the case, this is potentially bad as it can break code the was
> used
> > in
> > > > > > previous verison of VFP. Can anyone else confirm this?



Sun, 01 May 2005 02:15:56 GMT  
 VFP8 SQLConnect() bug
Hi!

It is sent to MS.

BTW, the documentation was not clear for SQLConect() at all. It looks like
this feature MUST exist by design, but just not docummented properly because
docummenting errors.

Thanks for this post!

--
WBR,
Vlad Grynchyshyn, Developer, MCP



Quote:
> Send it if you can. Microsoft should either fix the documentation so that
> this feature is documented, or they should remove it so that it no longer
> works. An undocumented feature like this that works, and works well, can
> cause a lot of problems when they change it. I've always done this and I
> thought it was a documented feature. I can't be the only one. Nor will be
> the only one who's code will be broken by this change, especially if
> Microsofts removes the feature.



> > Hi!

> > Well, personally, I did not know it worked that way in VFP6-7, exactly
> > because docummentation.

> > > it still breaks code that used to work.

> > Code that was made based on undocummented feature is not supported by
> > Microsoft. When it is undocummented, there were probably certain reasons
> for
> > that, is it right? :-)

> > I can send this to MS as a bug-report for VFP8 beta, but there is a
litlle
> > chance it will be fixed. Send it?

> > --
> > WBR,
> > Vlad Grynchyshyn, Developer, MCP



> > > This function also works if you use the name of a connection from the
> > > current database. It appears that this is either an
> > undocumented/unsupported
> > > feature, or an ommision in the documentation. More important, this
> worked
> > > with VFP6-7, but DOES NOT work with VFP8. If anyone did this in
previous
> > > versions of VFP, they will find their code to be broken in VFP8. I've
> sent
> > a
> > > note to to the VS Docs people about this, maybe they will update the
> > > documentation before VFP8 final ships.

> > > FWIW, I've always used a connection name with this function, I've
never
> > used
> > > an ODBC data source name, and it has always worked. When you create a
> > > connection in a database, you can provide userid/password so that when
> you
> > > connect to it with SQLCONNECT, you just do this:

> > > handle = SQLCONNECT( <database connection name>) and this works quite
> > well.

> > > What has changed is the error when trying to pass the third parameter
> when
> > > no password is needed - this is something that worked in previous
> versions
> > > but no longer does. I'm sure that several people will be quick to
> comment
> > > that this shouldn't be done this way, and they may very well be
correct.
> > But
> > > it still breaks code that used to work.



> > > > Hi!

> > > > Hej, Ook, did you read SQLConnect() docummentation accurately? First
> > > > parameter of SQLConnect() is not a Connection name from VFP
database.
> It
> > > is
> > > > ODBC Data Source name. Go to Control Panel -> Administrative
Tools ->
> > Data
> > > > Sources (ODBC). Create it there. Then use it in VFP. No CONNECTION
> > object
> > > in
> > > > VFP database is required for such case.

> > > > --
> > > > WBR,
> > > > Vlad Grynchyshyn, Developer, MCP



> > > > > Very interesting indeed! I'm also using SQL Server 2000 database
> > engine
> > > > > (MSDE 2000). I do this:

> > > > > CREATE DATABASE TEMP
> > > > > CREATE CONNECTION TEMP2 DATASOURCE MSSQL_OOK USERID SA
> > > > > AA=SQLCONNECT( 'TEMP2','SA','')

> > > > > And I get 'Function argument value, type, or count is invalid'.

> > > > > I do this:

> > > > > AA=SQLCONNECT( 'TEMP2','SA')

> > > > > and it works. What ODBC driver version are you using? I'm using
> > > > > 2000.81.7713.00. What is also interesting is that I get the exact
> same
> > > > > results using two different versions of the MySQL odbc drivers. I
> tend
> > > to
> > > > > think that this isn't an odbc driver issue, as it does the same
with
> > > three
> > > > > different drivers into 2 different sql databases. I then tried it
> > using
> > > > the
> > > > > VFP ODBC driver - exact same thing.

> > > > > OK, it works for you, gives an error for me. What else could cause
> > this
> > > to
> > > > > happen? What version of VFP are you testing this in? I'm using
VFP8
> > > beta,
> > > > > the public download that became available 2 days ago.



> > > > > > Hi!

> > > > > > I just did following:
> > > > > > - created ODBC data source
> > > > > > - ran command in the command window:
> > > > > > nn = SQLConnect('ttt','sa','')

> > > > > > It is working ok as expected. Maybe, something in ODBC data
> source?
> > I
> > > > used
> > > > > > SQL Server 2000 database engine (MSDE 2000).

> > > > > > Also, there is a new parameter for SQLConnect. It is possible it
> > > spoils
> > > > > > something. Go figure...

> > > > > > --
> > > > > > WBR,
> > > > > > Vlad Grynchyshyn, Developer, MCP



> > > > > > > lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> > > > > > > This works in VFP5, VFP6 and VFP7, but it does NOT work in
VFP8.
> > The
> > > > > error
> > > > > > > is:

> > > > > > > 'Function argument value, type, or count is invalid'

> > > > > > > The docs don't indicate any significant changes, I'm thinking
> this
> > > > might
> > > > > > > just be a bug on VFP8, or maybe a change that is not in the
> docs?
> > > > Which
> > > > > > ever
> > > > > > > the case, this is potentially bad as it can break code the was
> > used
> > > in
> > > > > > > previous verison of VFP. Can anyone else confirm this?



Sun, 01 May 2005 18:08:02 GMT  
 VFP8 SQLConnect() bug
I would guess that it is most definitely a feature by design. Something like
this would not work if it was by accident! Thanks for sending it to
Microsoft, I look forwards to seeing what (if anything) they do.


Quote:
> Hi!

> It is sent to MS.

> BTW, the documentation was not clear for SQLConect() at all. It looks like
> this feature MUST exist by design, but just not docummented properly
because
> docummenting errors.

> Thanks for this post!

> --
> WBR,
> Vlad Grynchyshyn, Developer, MCP



> > Send it if you can. Microsoft should either fix the documentation so
that
> > this feature is documented, or they should remove it so that it no
longer
> > works. An undocumented feature like this that works, and works well, can
> > cause a lot of problems when they change it. I've always done this and I
> > thought it was a documented feature. I can't be the only one. Nor will
be
> > the only one who's code will be broken by this change, especially if
> > Microsofts removes the feature.



> > > Hi!

> > > Well, personally, I did not know it worked that way in VFP6-7, exactly
> > > because docummentation.

> > > > it still breaks code that used to work.

> > > Code that was made based on undocummented feature is not supported by
> > > Microsoft. When it is undocummented, there were probably certain
reasons
> > for
> > > that, is it right? :-)

> > > I can send this to MS as a bug-report for VFP8 beta, but there is a
> litlle
> > > chance it will be fixed. Send it?

> > > --
> > > WBR,
> > > Vlad Grynchyshyn, Developer, MCP



> > > > This function also works if you use the name of a connection from
the
> > > > current database. It appears that this is either an
> > > undocumented/unsupported
> > > > feature, or an ommision in the documentation. More important, this
> > worked
> > > > with VFP6-7, but DOES NOT work with VFP8. If anyone did this in
> previous
> > > > versions of VFP, they will find their code to be broken in VFP8.
I've

> > sent
> > > a
> > > > note to to the VS Docs people about this, maybe they will update the
> > > > documentation before VFP8 final ships.

> > > > FWIW, I've always used a connection name with this function, I've
> never
> > > used
> > > > an ODBC data source name, and it has always worked. When you create
a
> > > > connection in a database, you can provide userid/password so that
when
> > you
> > > > connect to it with SQLCONNECT, you just do this:

> > > > handle = SQLCONNECT( <database connection name>) and this works
quite
> > > well.

> > > > What has changed is the error when trying to pass the third
parameter
> > when
> > > > no password is needed - this is something that worked in previous
> > versions
> > > > but no longer does. I'm sure that several people will be quick to
> > comment
> > > > that this shouldn't be done this way, and they may very well be
> correct.
> > > But
> > > > it still breaks code that used to work.



> > > > > Hi!

> > > > > Hej, Ook, did you read SQLConnect() docummentation accurately?
First
> > > > > parameter of SQLConnect() is not a Connection name from VFP
> database.
> > It
> > > > is
> > > > > ODBC Data Source name. Go to Control Panel -> Administrative
> Tools ->
> > > Data
> > > > > Sources (ODBC). Create it there. Then use it in VFP. No CONNECTION
> > > object
> > > > in
> > > > > VFP database is required for such case.

> > > > > --
> > > > > WBR,
> > > > > Vlad Grynchyshyn, Developer, MCP



> > > > > > Very interesting indeed! I'm also using SQL Server 2000 database
> > > engine
> > > > > > (MSDE 2000). I do this:

> > > > > > CREATE DATABASE TEMP
> > > > > > CREATE CONNECTION TEMP2 DATASOURCE MSSQL_OOK USERID SA
> > > > > > AA=SQLCONNECT( 'TEMP2','SA','')

> > > > > > And I get 'Function argument value, type, or count is invalid'.

> > > > > > I do this:

> > > > > > AA=SQLCONNECT( 'TEMP2','SA')

> > > > > > and it works. What ODBC driver version are you using? I'm using
> > > > > > 2000.81.7713.00. What is also interesting is that I get the
exact
> > same
> > > > > > results using two different versions of the MySQL odbc drivers.
I
> > tend
> > > > to
> > > > > > think that this isn't an odbc driver issue, as it does the same
> with
> > > > three
> > > > > > different drivers into 2 different sql databases. I then tried
it
> > > using
> > > > > the
> > > > > > VFP ODBC driver - exact same thing.

> > > > > > OK, it works for you, gives an error for me. What else could
cause
> > > this
> > > > to
> > > > > > happen? What version of VFP are you testing this in? I'm using
> VFP8
> > > > beta,
> > > > > > the public download that became available 2 days ago.



> > > > > > > Hi!

> > > > > > > I just did following:
> > > > > > > - created ODBC data source
> > > > > > > - ran command in the command window:
> > > > > > > nn = SQLConnect('ttt','sa','')

> > > > > > > It is working ok as expected. Maybe, something in ODBC data
> > source?
> > > I
> > > > > used
> > > > > > > SQL Server 2000 database engine (MSDE 2000).

> > > > > > > Also, there is a new parameter for SQLConnect. It is possible
it
> > > > spoils
> > > > > > > something. Go figure...

> > > > > > > --
> > > > > > > WBR,
> > > > > > > Vlad Grynchyshyn, Developer, MCP



> > > > > > > > lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> > > > > > > > This works in VFP5, VFP6 and VFP7, but it does NOT work in
> VFP8.
> > > The
> > > > > > error
> > > > > > > > is:

> > > > > > > > 'Function argument value, type, or count is invalid'

> > > > > > > > The docs don't indicate any significant changes, I'm
thinking
> > this
> > > > > might
> > > > > > > > just be a bug on VFP8, or maybe a change that is not in the
> > docs?
> > > > > Which
> > > > > > > ever
> > > > > > > > the case, this is potentially bad as it can break code the
was
> > > used
> > > > in
> > > > > > > > previous verison of VFP. Can anyone else confirm this?



Mon, 02 May 2005 02:58:16 GMT  
 VFP8 SQLConnect() bug
Hi!

It was sent by another developer already, I just confirmed it <s>

--
WBR,
Vlad Grynchyshyn, Developer, MCP



Quote:
> I would guess that it is most definitely a feature by design. Something
like
> this would not work if it was by accident! Thanks for sending it to
> Microsoft, I look forwards to seeing what (if anything) they do.



> > Hi!

> > It is sent to MS.

> > BTW, the documentation was not clear for SQLConect() at all. It looks
like
> > this feature MUST exist by design, but just not docummented properly
> because
> > docummenting errors.

> > Thanks for this post!

> > --
> > WBR,
> > Vlad Grynchyshyn, Developer, MCP



> > > Send it if you can. Microsoft should either fix the documentation so
> that
> > > this feature is documented, or they should remove it so that it no
> longer
> > > works. An undocumented feature like this that works, and works well,
can
> > > cause a lot of problems when they change it. I've always done this and
I
> > > thought it was a documented feature. I can't be the only one. Nor will
> be
> > > the only one who's code will be broken by this change, especially if
> > > Microsofts removes the feature.



> > > > Hi!

> > > > Well, personally, I did not know it worked that way in VFP6-7,
exactly
> > > > because docummentation.

> > > > > it still breaks code that used to work.

> > > > Code that was made based on undocummented feature is not supported
by
> > > > Microsoft. When it is undocummented, there were probably certain
> reasons
> > > for
> > > > that, is it right? :-)

> > > > I can send this to MS as a bug-report for VFP8 beta, but there is a
> > litlle
> > > > chance it will be fixed. Send it?

> > > > --
> > > > WBR,
> > > > Vlad Grynchyshyn, Developer, MCP



> > > > > This function also works if you use the name of a connection from
> the
> > > > > current database. It appears that this is either an
> > > > undocumented/unsupported
> > > > > feature, or an ommision in the documentation. More important, this
> > > worked
> > > > > with VFP6-7, but DOES NOT work with VFP8. If anyone did this in
> > previous
> > > > > versions of VFP, they will find their code to be broken in VFP8.
> I've

> > > sent
> > > > a
> > > > > note to to the VS Docs people about this, maybe they will update
the
> > > > > documentation before VFP8 final ships.

> > > > > FWIW, I've always used a connection name with this function, I've
> > never
> > > > used
> > > > > an ODBC data source name, and it has always worked. When you
create
> a
> > > > > connection in a database, you can provide userid/password so that
> when
> > > you
> > > > > connect to it with SQLCONNECT, you just do this:

> > > > > handle = SQLCONNECT( <database connection name>) and this works
> quite
> > > > well.

> > > > > What has changed is the error when trying to pass the third
> parameter
> > > when
> > > > > no password is needed - this is something that worked in previous
> > > versions
> > > > > but no longer does. I'm sure that several people will be quick to
> > > comment
> > > > > that this shouldn't be done this way, and they may very well be
> > correct.
> > > > But
> > > > > it still breaks code that used to work.



> > > > > > Hi!

> > > > > > Hej, Ook, did you read SQLConnect() docummentation accurately?
> First
> > > > > > parameter of SQLConnect() is not a Connection name from VFP
> > database.
> > > It
> > > > > is
> > > > > > ODBC Data Source name. Go to Control Panel -> Administrative
> > Tools ->
> > > > Data
> > > > > > Sources (ODBC). Create it there. Then use it in VFP. No
CONNECTION
> > > > object
> > > > > in
> > > > > > VFP database is required for such case.

> > > > > > --
> > > > > > WBR,
> > > > > > Vlad Grynchyshyn, Developer, MCP



> > > > > > > Very interesting indeed! I'm also using SQL Server 2000
database
> > > > engine
> > > > > > > (MSDE 2000). I do this:

> > > > > > > CREATE DATABASE TEMP
> > > > > > > CREATE CONNECTION TEMP2 DATASOURCE MSSQL_OOK USERID SA
> > > > > > > AA=SQLCONNECT( 'TEMP2','SA','')

> > > > > > > And I get 'Function argument value, type, or count is
invalid'.

> > > > > > > I do this:

> > > > > > > AA=SQLCONNECT( 'TEMP2','SA')

> > > > > > > and it works. What ODBC driver version are you using? I'm
using
> > > > > > > 2000.81.7713.00. What is also interesting is that I get the
> exact
> > > same
> > > > > > > results using two different versions of the MySQL odbc
drivers.
> I
> > > tend
> > > > > to
> > > > > > > think that this isn't an odbc driver issue, as it does the
same
> > with
> > > > > three
> > > > > > > different drivers into 2 different sql databases. I then tried
> it
> > > > using
> > > > > > the
> > > > > > > VFP ODBC driver - exact same thing.

> > > > > > > OK, it works for you, gives an error for me. What else could
> cause
> > > > this
> > > > > to
> > > > > > > happen? What version of VFP are you testing this in? I'm using
> > VFP8
> > > > > beta,
> > > > > > > the public download that became available 2 days ago.



> > > > > > > > Hi!

> > > > > > > > I just did following:
> > > > > > > > - created ODBC data source
> > > > > > > > - ran command in the command window:
> > > > > > > > nn = SQLConnect('ttt','sa','')

> > > > > > > > It is working ok as expected. Maybe, something in ODBC data
> > > source?
> > > > I
> > > > > > used
> > > > > > > > SQL Server 2000 database engine (MSDE 2000).

> > > > > > > > Also, there is a new parameter for SQLConnect. It is
possible
> it
> > > > > spoils
> > > > > > > > something. Go figure...

> > > > > > > > --
> > > > > > > > WBR,
> > > > > > > > Vlad Grynchyshyn, Developer, MCP



> > > > > > > > > lhHANDLE = SQLCONNECT( 'mysql','ook','ook')

> > > > > > > > > This works in VFP5, VFP6 and VFP7, but it does NOT work in
> > VFP8.
> > > > The
> > > > > > > error
> > > > > > > > > is:

> > > > > > > > > 'Function argument value, type, or count is invalid'

> > > > > > > > > The docs don't indicate any significant changes, I'm
> thinking
> > > this
> > > > > > might
> > > > > > > > > just be a bug on VFP8, or maybe a change that is not in
the
> > > docs?
> > > > > > Which
> > > > > > > > ever
> > > > > > > > > the case, this is potentially bad as it can break code the
> was
> > > > used
> > > > > in
> > > > > > > > > previous verison of VFP. Can anyone else confirm this?



Mon, 02 May 2005 23:50:54 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. SQLConnect() bug

2. VFP8: String Manipulation Bug

3. VFP8 combobox bug

4. Bug in VFP8

5. BUG in VFP8: Scrolling in Toolbar Editor

6. VFP8: String Manipulation Bug

7. big bug (vfp8)

8. vfp8 : alter table bug

9. vfp8 bug report (alter table command)

10. vfp8 alter table bug

11. VFP8: possible C5 bug - please confirm

12. possible bug in VFP8

 

 
Powered by phpBB® Forum Software