473,686 Members | 2,783 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1300
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*@discussion s.microsoft.com wrote in message
news:B5******** *************** ***********@mic rosoft.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
15883
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 how can I take this command and have it work in PL/SQL ??? Any ideas, samples ????? Thanks in advance George Lewycky
2
12658
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 ${SCHEMA_NM}/${SCHEMA_PASSWD}@${DB_NM} <<-ANALYZE_TABLE SET TERMOUT ON
0
10195
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 database table, using dynamic sql. Executing 'EXEC SQL DESCRIBE SELECT LIST FOR S INTO select_dp;' the error code -2149 is returned That means "Specified partition does not exist". Does anybody know if it is a database problem or a problem of
3
6839
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 details. As an example, we're unclear on whether ANSI 99 JOIN syntax is allowed or not. (Any direct answers on this topic would be appreciated). Is there a document which precisely defines the PL/SQL syntax?
10
4453
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 Enterplise Linux 3 ES, and applied FixPack fp5_mi00069.tar to it. After creating an instance, starting the database, creating a database, and entering the table definitions, all of which seems to work OK, I entered a tiny 8-row table and can do...
11
4257
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 threads of a multithreaded program using embedded SQL. Since the threads do not need to share transaction scopes, the sqleAttachToCtx family of APIs do not seem to be necessary. <quote> In the default implementation of threaded applications against...
6
2238
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 statement that stay behind a current, but not yet saved query. When I work on saved queries I use: strCurrentName = CurrentObjectName Dim dbsCurrent As Database Set dbsCurrent = CurrentDb
0
20333
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 3/31/98 Kathy Gleeson ________________________________________
4
1685
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, q.CRW2_NAME," ; sql += " q.CRW2_CERT, q.CREW_SIGN, q.SUPRV_NAME, q.SUPRV_SIGN, q.SUPRV_ASGN,"; sql += " q.CB_01, q.CB_02, q.CB_03, q.CB_04, q.CB_05, q.CB_06, q.CB_07, q.CB_08,"; sql += " q.CB_09,q.CB_10, q.CB_11, q.CB_12, q.CB_13,...
5
9283
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 records from an external Oracle source using a SQL statement. The SQL statement works as expected when the loop code is commented out, but I receive an error "SQL command not properly ended" when the loop is active. Do Until intLoop = UserNum ...
0
8585
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9057
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8933
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8770
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8779
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7600
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6440
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5799
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
1935
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.