Re: How to connect VB6 to SQL 2005 database?




"HK" <replywithingroup@xxxxxxxxxxx> wrote in message
news:ic%Lf.1527$h81.219@xxxxxxxxxxxxxxxxxxxxxxx

"MikeD" <nobody@xxxxxxxxxxx> wrote in message
news:uOQvAngOGHA.3100@xxxxxxxxxxxxxxxxxxxxxxx

[snip]

See the following:

Using SQL Express from Visual Basic 6
http://msdn.microsoft.com/vbrun/vbfusion/usingsqlexpress/

Very interesting article. The links in it were good as well, looks like the
new T-SQL features will come in handy, but...

I don't get what it says about MARS; specifically, the statement that it is
not possible to use one connection with more than one recordset, using SQL
2K (or SQL 7 for that matter.)

I have code deployed all over creation that proves otherwise -- including,
but not limited to, a [somewhat contrived] demo of a custom data source
control, that opens 2 recordsets containing the same records, but sorted in
opposite order. In a nutshell: "SELECT * FROM (" & UserSQL & ") drs ORDER
BY 1" for the first, and the same thing with " DESC" appended for the
second -- constructed to allow me to impose an arbitrary sort while neither
making assumptions about the user-entered SQL, nor jeaprodizing syntax.(*)

It is true that there are certain scenarios that make multiple use of a
connection counter-intuitive, and also true that lack of understanding those
scenarios can make attempting multiple use of a connection into a
frustrating ordeal... Avoiding the pitfalls of those scenarios may even be
challenging (for some -- that surely isn't my view) but impossible: it is
not... not by a damn sight.

And so I have to wonder what the basis for that statement was... and what
others in this ng thought about that end....


-Mark





(*) For those of you who may wish to point out that an ORDER BY clause in
UserSQL will break my derivation, it also injects " TOP 100 PERCENT " into
UserSQL, immediately after the first occurrence of SELECT, if the next word
is not already TOP -- again in the name of syntax preservation.


Mike
Microsoft MVP Visual Basic




That article says to download the 2.0 framework. Is that required? I
thought MDAC 2.8 would cover it.




.



Relevant Pages

  • Re: ASP - FROM statement slows down connection to database
    ... Open your database in Access, switch to the Queries tab, create a new query ... in Design View without choosing a table, swtich to SQL View, paste the sql ... connection string rather than using an ... recordset open statements. ...
    (microsoft.public.inetserver.asp.db)
  • Re: very high cpu/ram usage: many Excel/SQL Server ADO return-trips
    ... what the endpoint of all your loops is. ... There may be a pure SQL ... > module and an ADO connection. ... though within the loop that creates a recordset I also give ...
    (microsoft.public.excel.programming)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... Please stick to having an "dummy" connection in Open State. ... SQL CE/Mobile has a background thread that flushes the changes ... they run for long hours and we have not seen memory leaks so far. ... then opens his work forms and it's in ...
    (microsoft.public.sqlserver.ce)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... Please stick to having an "dummy" connection in Open State. ... So it is a kind of asynchronous commit which happens every 10 ... I am not sure of this claim as we have many applications built on SQL CE ... then opens his work forms and it's in ...
    (microsoft.public.sqlserver.ce)
  • Re: What to do when you cant retrieve content from a DB
    ... when the SQL server goes down or the sites lose their ... SQL connection strings for pages are available from both web.config ... allowing you to close your recordset and connection immediately before ...
    (microsoft.public.inetserver.asp.db)