473,399 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 1292
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: george lewycky | last post by:
I am trying to take a field description for a column of about 200+ bytes and wrap the field into 3 lines of 70 bytes apiece in PL/SQL!!!!!! I know this can be done in SQL*Plus as show below but...
2
by: Peter | last post by:
I run most of my SQL scripts via kornshell on AIX. I use the "here-document" to run some of the smaller ones. Example: #!/bin/ksh # Analyze the table. sqlplus...
0
by: Jan | last post by:
I store sql-commands in a database table. In the first step I get the sql command out of the database table with embedded sql. In the second step I try to execute the command, which i got from the...
3
by: Ira Baxter | last post by:
Hi. We are working on tools to process PL/SQL code. What we need are precise details on the full PL/SQL syntax. We have the Oracle 9/10 documentation, but it seems a little fuzzy on the...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
11
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate...
6
by: sghi | last post by:
Hi All, I'm new to this group and quite new to access/vba. So, shortly after beginning to write a simple application for my wife, I came across a blocking problem: I need to intercept the sql...
0
by: Medhatithi | last post by:
Hi, I have been in several ways benefiited from this site. I would like to share some sql tuning techniques(simple, but effective) with you all. SQL Tuning Tips Oracle Tips Session #6 ...
4
by: arial | last post by:
Hi all, Need your help again. string sql = " select "; sql += " q.ID, q.PALMNAME, q.CB_COMPLET, q.CMPLT_TIME, q.UNIT_NAME,"; sql += " q.CB_CREW1, q.CRW1_NAME, q.CRW1_CERT, q.CB_CREW2,...
5
by: dbrother | last post by:
Access 2003 Win XP Pro SP3 Using SQL /ADO Recordsets in a Do Loop Hello, I'm using a random number generator based on an integer input from a user from a form that will get X number of random...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.