469,909 Members | 1,738 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

c# and sql-server express 2005

Hi All,
I'm pretty new to using these technologies so bear with me. I have created
a c# app which communicates with sql-server express 2005. When I run an
insert on a table via the SqlCommand class nothing seems to happen! No
errors are apparent either. If I check the table contents in the IDE I see
that they have not been updated.

However...

If I run the app outside of the development environment the data seems to
get inserted properly and can be seen within the application between
instances. Checking the table contents within the IDE shows that they have
not changed?! Sometimes the data seems to disappear from the tables, though
I haven't figured out how or why yet.

When running outside of the IDE I see the same data that was set-up on the
tables in the IDE so it must be the same Db, but for some reason inserts
don't seem to show up.

I'm guessing that I'm lacking some kind of understanding as to the databases
instancing? but I'm not sure. Any help would be most appreciated.

Thanks
RobP
'There are only 10 types of people in this world - Those that understand
binary and those that don't'
Oct 13 '06 #1
2 1184
MMA
Hi Rob,
Seems quite perculiar, but the next you try debugging your app within VS (I
am assuming you are using VS) try refreshing the tables that you are
inserting into to see if the data did get populated. The only other reason I
can think of that you are not able to see the data when in debug mode could
be because the transaction has not commited yet. So you may want to look into
commiting your trans within the code. Also throw a try catch block where you
are making the insertion and see if it lead you any where.

Hope this helps.

Thanks
"Rob Pollard" wrote:
Hi All,
I'm pretty new to using these technologies so bear with me. I have created
a c# app which communicates with sql-server express 2005. When I run an
insert on a table via the SqlCommand class nothing seems to happen! No
errors are apparent either. If I check the table contents in the IDE I see
that they have not been updated.

However...

If I run the app outside of the development environment the data seems to
get inserted properly and can be seen within the application between
instances. Checking the table contents within the IDE shows that they have
not changed?! Sometimes the data seems to disappear from the tables, though
I haven't figured out how or why yet.

When running outside of the IDE I see the same data that was set-up on the
tables in the IDE so it must be the same Db, but for some reason inserts
don't seem to show up.

I'm guessing that I'm lacking some kind of understanding as to the databases
instancing? but I'm not sure. Any help would be most appreciated.

Thanks
RobP
'There are only 10 types of people in this world - Those that understand
binary and those that don't'
Oct 13 '06 #2
Thanks for the reply. I tried a Try-Catch (No errors thrown) and I
introduced transactional handling and neither seems to make any difference.
Its almost like the tables in VS are some sort of base template that cannot
be altered but are used for creating other 'instances' of the Db. I know
that SQL-Server Express is many orders of magnitude more robust than the
original Access style DB's and I'm guessing that along with this robustness
comes an administrative overhead which due to my lack of familiarity might
be producing the problems that I am seeing.

RobP
'There are only 10 types of people in this world - Those that understand
binary and those that don't'
"MMA" <MM*@discussions.microsoft.comwrote in message
news:B5**********************************@microsof t.com...
Hi Rob,
Seems quite perculiar, but the next you try debugging your app within VS
(I
am assuming you are using VS) try refreshing the tables that you are
inserting into to see if the data did get populated. The only other reason
I
can think of that you are not able to see the data when in debug mode
could
be because the transaction has not commited yet. So you may want to look
into
commiting your trans within the code. Also throw a try catch block where
you
are making the insertion and see if it lead you any where.

Hope this helps.

Thanks
"Rob Pollard" wrote:
>Hi All,
I'm pretty new to using these technologies so bear with me. I have
created
a c# app which communicates with sql-server express 2005. When I run an
insert on a table via the SqlCommand class nothing seems to happen! No
errors are apparent either. If I check the table contents in the IDE I
see
that they have not been updated.

However...

If I run the app outside of the development environment the data seems to
get inserted properly and can be seen within the application between
instances. Checking the table contents within the IDE shows that they
have
not changed?! Sometimes the data seems to disappear from the tables,
though
I haven't figured out how or why yet.

When running outside of the IDE I see the same data that was set-up on
the
tables in the IDE so it must be the same Db, but for some reason inserts
don't seem to show up.

I'm guessing that I'm lacking some kind of understanding as to the
databases
instancing? but I'm not sure. Any help would be most appreciated.

Thanks
RobP
'There are only 10 types of people in this world - Those that understand
binary and those that don't'

Oct 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by george lewycky | last post: by
2 posts views Thread by Peter | last post: by
reply views Thread by Medhatithi | last post: by
4 posts views Thread by arial | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.