VC# 2008 express prretty amazing

  • Thread starter Thread starter RvGrah
  • Start date Start date
R

RvGrah

I've always bought VS Pro in the past, and wanted to try it out but
it's not available yet, so I downloaded 2008 Express and opend copies
of some of my apps in it. Amazingly, all my code works just fine, and
more importantly it runs faster, both the environment and the exe's on
client machines. Some by an order of magnitude, as in things that took
5 seconds before being unmeasurable (to the eye) now.

One headache though, at design time, in dataset design views, I can't
connect to a running instance of a Sql Developer edition database.
Fine, maybe the free version doesn't support that. So I exported the
database to a backup copy and restored that to an instance of
SqlExpress on the same machine. Can't connect to that either, it says
"the file is in use" (It seems you have to specify the file, not the
databas instance). So I detach the file, and now I can connect to it,
if I make sure that neither Sql Developer nor Express currently have a
any locks on it, which they seem to try to do anyway.

Does anyone have an idea of how to connect to the running instance in
Sql Express or Sql Developer? In Design view?

Thanks, Bob
 
For info, "pro" and "team system" are available to MSDN subscribers.

As for the data access, this may be obtuse, but it works:

Go through the process once, but put in a new database file and let it
create new. Create an empty DataSet if needs be (just so you don't
have to click "Cancel").

When you get control back, edit app.config, and change the connection
string to your instance, i.e. something like
Data Source=MGRAVELL\SQLEXPRESS;Initial Catalog=Northwind;Integrated
Security=True

Go into the settings file; it will detect the change to app.config and
prompt to auto-update the settings file. Accept its offer.

Now go to add a new data-source, and choose your existing (edited)
connection string.

Et-voila - you now have access to your running SQL Express instance,
rather than a fixed file.

Marc
 
Alternatively, if you just open the settings file, add a new setting
(application level), select "(connection string)", and paste your
connection-string (as per above - *don't* use the helper). Now edit
app.config (connectionStrings) and specify
providerName="System.Data.SqlClient".

Now it should work without as many steps.

That do?
 
Marc,

I appreciate the response.

I've had MSDN subcriptions in the past, but found them too expensive
to justify in the interim years, and too expensive to re-invest if you
don't get the upgrade price.

I'm quite familiar with making changes in the config file, I use it
quite often, and had taken to using it in this instance, but it
actually gave me trouble at compile if I put a standard connect string
there manually, the same string I use all the time in 2005 versions.
Instead I'm using a "global" const string variable in the startup form
and setting all connection properties to it in the load process of the
child forms.

However, the real problem is the inability to connect in a dataset
design view. Even to sql express on the local machine, which is
supposed to be supported in the express versions.

Bob
 
gave me trouble at compile
Can you describe the issue at all?
However, the real problem is the inability to connect in a dataset
design view. Even to sql express on the local machine,
I had this working fine using the above; did you have different
results?
which is supposed to be supported in the express versions.
Yes, the UI is a little annoying in that it demands a file path, but
if you bypass this it seems (to me at least) to work fine. It you are
seeing something different, please post with the specifics. However,
SQL Express has 2 modes of use; on the dedicated server instance, and
as a per-process instance; it appears to favor the latter at the
detriment of the former. But it does appear to work...

Marc
 
Seems to be an issue with more than one process accessing the database
at the same time. I'm used to working in Sql Management Studio with
the database files at the same time code against them in the dev ide.
If I re-start the sql process in Services then I can work with it in
the ide alright. Just not a limitation I'm used to.

The error is generally about the "file is in use"....

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top