easiest way for beginner to start database?

I know this is vague but would appreciate any general advice to give me a 
quick start...
I'm new to c# and new to databases.
I want to create two tables, tblBidders, tblProjects
tblBidders will list companies
tblProjects will list projects
one view would show projects
    pick project and see list of all bidders
other view would show bidders
    pick bidder and see list of all projects bidding on

any tips for easiest place to start?
eg which control to show datatable on form
would wpf or winform be better/easier ?
sqlite or ado.net
etc

thanks
mark 


0
mp
12/19/2009 9:19:14 PM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

25 Replies
799 Views

Similar Articles

[PageSpeed] 30

On Dec 19, 4:19=A0pm, "mp" <nos...@Thanks.com> wrote:
> I know this is vague but would appreciate any general advice to give me a
> quick start...
> I'm new to c# and new to databases.
> I want to create two tables, tblBidders, tblProjects
> tblBidders will list companies
> tblProjects will list projects
> one view would show projects
> =A0 =A0 pick project and see list of all bidders
> other view would show bidders
> =A0 =A0 pick bidder and see list of all projects bidding on
>
> any tips for easiest place to start?
> eg which control to show datatable on form
> would wpf or winform be better/easier ?
> sqlite or ado.net
> etc
>
> thanks
> mark

You want an honest answer?  You will not hear this from the SQL crowd,
and yes I do program in ADO.NET, but the easiest, fastest and for you
the best way is to forget databases entirely, and go the XML route.
Simply put your data into an XML file, and read/write from it.  You
can use XML as a source for listboxes, comboboxes, etc.  Once you
populate your list box, you can sort too (built into listboxes).  If
you program in WPF it's just like a database for most people.  BTW
your idea of a 'database' is probably not a real database.  A real
database is normalized according to Cobb's rules, with cryptic and non-
redudant info (typically you cannot make head or tails out of the raw
data in a true database, it's so broken up and atomized) and believe
you me, unless you want to take a time out of at least 6 months to
learn that stuff (like I did), you don't want to go down that road.
XML it. A book by Bipin Joshi is decent on XML, but any textbook tells
you about XML.  Also you'll use LINQ over SQL commands, which are
easier to learn.  If you insist on databases only buy the books by
Sceppa--the rest are trash.

Caveat emptor.  You might get answers from Peter and others here who
think I am a troll and that might lead you astray--don't listen to
them.  You've been warned.  If you do want to learn about databases
that's fine, but like I say it won't really solve most of your
problems.  I routinely use XML even though I'm pretty good by now
using SQL (and SQL commands, rather than LINQ).

RL
0
RayLopez99
12/20/2009 1:54:01 PM
On 12/20/2009 8:54 AM, RayLopez99 wrote:
> On Dec 19, 4:19 pm, "mp"<nos...@Thanks.com>  wrote:
>> I know this is vague but would appreciate any general advice to give me a
>> quick start...
>> I'm new to c# and new to databases.
>> I want to create two tables, tblBidders, tblProjects
>> tblBidders will list companies
>> tblProjects will list projects
>> one view would show projects
>>      pick project and see list of all bidders
>> other view would show bidders
>>      pick bidder and see list of all projects bidding on
>>
>> any tips for easiest place to start?
>> eg which control to show datatable on form
>> would wpf or winform be better/easier ?
>> sqlite or ado.net
>> etc
>>
>> thanks
>> mark
>
> You want an honest answer?  You will not hear this from the SQL crowd,
> and yes I do program in ADO.NET, but the easiest, fastest and for you
> the best way is to forget databases entirely, and go the XML route.
> Simply put your data into an XML file, and read/write from it.  You
> can use XML as a source for listboxes, comboboxes, etc.  Once you
> populate your list box, you can sort too (built into listboxes).  If
> you program in WPF it's just like a database for most people.  BTW
> your idea of a 'database' is probably not a real database.  A real
> database is normalized according to Cobb's rules, with cryptic and non-
> redudant info (typically you cannot make head or tails out of the raw
> data in a true database, it's so broken up and atomized) and believe
> you me, unless you want to take a time out of at least 6 months to
> learn that stuff (like I did), you don't want to go down that road.
> XML it. A book by Bipin Joshi is decent on XML, but any textbook tells
> you about XML.  Also you'll use LINQ over SQL commands, which are
> easier to learn.  If you insist on databases only buy the books by
> Sceppa--the rest are trash.
>
> Caveat emptor.  You might get answers from Peter and others here who
> think I am a troll and that might lead you astray--don't listen to
> them.  You've been warned.  If you do want to learn about databases
> that's fine, but like I say it won't really solve most of your
> problems.  I routinely use XML even though I'm pretty good by now
> using SQL (and SQL commands, rather than LINQ).
>
> RL

For a previous discussion _opposed_ to this line of reasoning, please see:

http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/a184510b20bec196


-- 
Mike
0
Family
12/20/2009 4:10:41 PM
On 12/19/2009 4:19 PM, mp wrote:
> I know this is vague but would appreciate any general advice to give me a
> quick start...
> I'm new to c# and new to databases.
> I want to create two tables, tblBidders, tblProjects
> tblBidders will list companies
> tblProjects will list projects
> one view would show projects
>      pick project and see list of all bidders
> other view would show bidders
>      pick bidder and see list of all projects bidding on
>
> any tips for easiest place to start?
> eg which control to show datatable on form
> would wpf or winform be better/easier ?
> sqlite or ado.net
> etc
>
> thanks
> mark
>
>

I would start by following some of the MSDN walkthroughs, just google 
"Sql Compact CSharp Walkthrough".  The question of WPF versus winform, 
does not really come into play just because your app is database driven. 
  More examples are available for Winforms, and frankly, in my opinion, 
it's easier to understand than WPF.

Most all controls can bind to data sources, so the control choice really 
depends on the purpose in the app.  If showing an entire table, then 
perhaps the datagridview.  If showing a choice from all unique values, 
then perhaps a combobox.

-- 
Mike
0
Family
12/20/2009 4:20:43 PM
RayLopez99 wrote:
> On Dec 19, 4:19 pm, "mp" <nos...@Thanks.com> wrote:
>> I know this is vague but would appreciate any general advice to give me a
>> quick start...
>> I'm new to c# and new to databases.
>> I want to create two tables, tblBidders, tblProjects
>> tblBidders will list companies
>> tblProjects will list projects
>> one view would show projects
>>     pick project and see list of all bidders
>> other view would show bidders
>>     pick bidder and see list of all projects bidding on
>>
>> any tips for easiest place to start?
>> eg which control to show datatable on form
>> would wpf or winform be better/easier ?
>> sqlite or ado.net
>> etc
>>
>> thanks
>> mark
> 
> You want an honest answer? [snip rambling...]
> 
> RL

Bloated, over-generalized reply.

Short version:

"I have a brand new XML hammer and the
world is now an XML nail."
0
TheMan
12/20/2009 4:36:09 PM
"RayLopez99" <raylopez88@gmail.com> wrote in message 
news:a1f6c95a-b497-44e9-85c6-97ecab8855ff@s31g2000yqs.googlegroups.com...

> You want an honest answer?  You will not hear this from the SQL crowd,
> and yes I do program in ADO.NET, but the easiest, fastest and for you
> the best way is to forget databases entirely, and go the XML route.
> Simply put your data into an XML file, and read/write from it.

To the OP: ignore this post completely.

Using XML as a database is *ALWAYS* the wrong answer, simply because XML 
isn't a database.


-- 
Mark Rae
ASP.NET MVP
http://www.markrae.net 

0
Mark
12/20/2009 9:47:11 PM
"mp" <nospam@Thanks.com> wrote in message 
news:e2nuqDPgKHA.2104@TK2MSFTNGP05.phx.gbl...

>I know this is vague but would appreciate any general advice to give me a 
>quick start...

http://www.google.co.uk/search?rlz=1C1CHMA_en-GBGB328GB328&aq=f&sourceid=chrome&ie=UTF-8&q=%22c%23%22+database+tutorial


-- 
Mark Rae
ASP.NET MVP
http://www.markrae.net 

0
Mark
12/20/2009 9:48:30 PM
On 20-12-2009 08:54, RayLopez99 wrote:
> On Dec 19, 4:19 pm, "mp"<nos...@Thanks.com>  wrote:
>> I know this is vague but would appreciate any general advice to give me a
>> quick start...
>> I'm new to c# and new to databases.
>> I want to create two tables, tblBidders, tblProjects
>> tblBidders will list companies
>> tblProjects will list projects
>> one view would show projects
>>      pick project and see list of all bidders
>> other view would show bidders
>>      pick bidder and see list of all projects bidding on
>>
>> any tips for easiest place to start?
>> eg which control to show datatable on form
>> would wpf or winform be better/easier ?
>> sqlite or ado.net

> You want an honest answer?  You will not hear this from the SQL crowd,
> and yes I do program in ADO.NET, but the easiest, fastest and for you
> the best way is to forget databases entirely, and go the XML route.
> Simply put your data into an XML file, and read/write from it.

Using XML for a database that need to be updated is usually not
a good approach, because it raises a lot of concurrency issues, that
the database software solved for you.

>                                                           BTW
> your idea of a 'database' is probably not a real database.  A real
> database is normalized according to Cobb's rules,

Cobb ????

Codd maybe ?

>                                                  with cryptic and non-
> redudant info (typically you cannot make head or tails out of the raw
> data in a true database, it's so broken up and atomized)

Most people manage to understand normalized databases fine.

Arne
0
ISO
12/20/2009 9:55:06 PM
Thanks
mark

"Mark Rae [MVP]" <mark@markNOSPAMrae.net> wrote in message 
news:ugjcu4bgKHA.1540@TK2MSFTNGP06.phx.gbl...
> "mp" <nospam@Thanks.com> wrote in message 
> news:e2nuqDPgKHA.2104@TK2MSFTNGP05.phx.gbl...
>
>>I know this is vague but would appreciate any general advice to give me a 
>>quick start...
>
> http://www.google.co.uk/search?rlz=1C1CHMA_en-GBGB328GB328&aq=f&sourceid=chrome&ie=UTF-8&q=%22c%23%22+database+tutorial
>
>
> -- 
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net 


0
mp
12/21/2009 2:17:42 AM
Thanks
mark

"Family Tree Mike" <FamilyTreeMike@ThisOldHouse.com> wrote in message 
news:ONsRfBZgKHA.2104@TK2MSFTNGP05.phx.gbl...
> On 12/19/2009 4:19 PM, mp wrote:
>> I know this is vague but would appreciate any general advice to give me a
>> quick start...
>> I'm new to c# and new to databases.
>> I want to create two tables, tblBidders, tblProjects
>> tblBidders will list companies
>> tblProjects will list projects
>> one view would show projects
>>      pick project and see list of all bidders
>> other view would show bidders
>>      pick bidder and see list of all projects bidding on
>>
>> any tips for easiest place to start?
>> eg which control to show datatable on form
>> would wpf or winform be better/easier ?
>> sqlite or ado.net
>> etc
>>
>> thanks
>> mark
>>
>>
>
> I would start by following some of the MSDN walkthroughs, just google "Sql 
> Compact CSharp Walkthrough".  The question of WPF versus winform, does not 
> really come into play just because your app is database driven. More 
> examples are available for Winforms, and frankly, in my opinion, it's 
> easier to understand than WPF.
>
> Most all controls can bind to data sources, so the control choice really 
> depends on the purpose in the app.  If showing an entire table, then 
> perhaps the datagridview.  If showing a choice from all unique values, 
> then perhaps a combobox.
>
> -- 
> Mike 


0
mp
12/21/2009 2:32:58 AM
On Dec 20, 4:55=A0pm, Arne Vajh=F8j <a...@vajhoej.dk> wrote:

> Most people manage to understand normalized databases fine.
>
> Arne

But don't forget, who said this below? And reread the OP carefully.
That guy not say he would be reading and writing at the same time.  He
might think he wants to do that, but 99.9% of the time people use
databases for read only.  I rest my case Arne.

RL

If your data is readonly data, then your XML files will work fine.
But if you need to update data, then supporting multiple concurrent
updates to files and recovery if somethings crashes in the middle
will be a lot of work with file and a piece of cake with
database. [NOT TRUE--HOW IS A CRASH IN THE MIDDLE OF READING AN XML
FILE A PROBLEM?--RL]

Performance wise XML files will probably perform similar to database
tables without indexes. Which is OK for the data size you list. But
I am a bit skeptical about whether you really know that data would
never grow bigger.


0
RayLopez99
12/22/2009 9:12:31 PM
On 12/22/2009 4:12 PM, RayLopez99 wrote:
> On Dec 20, 4:55 pm, Arne Vajh�j<a...@vajhoej.dk>  wrote:
>
>> Most people manage to understand normalized databases fine.
>>
>> Arne
>
> But don't forget, who said this below? And reread the OP carefully.
> That guy not say he would be reading and writing at the same time.  He
> might think he wants to do that, but 99.9% of the time people use
> databases for read only.  I rest my case Arne.
>
> RL
>
> If your data is readonly data, then your XML files will work fine.
> But if you need to update data, then supporting multiple concurrent
> updates to files and recovery if somethings crashes in the middle
> will be a lot of work with file and a piece of cake with
> database. [NOT TRUE--HOW IS A CRASH IN THE MIDDLE OF READING AN XML
> FILE A PROBLEM?--RL]

Updating, means writing, not reading.  A crash during that is very bad...

-- 
Mike
0
Family
12/22/2009 11:41:50 PM
On Dec 22, 6:41=A0pm, Family Tree Mike <FamilyTreeM...@ThisOldHouse.com>
wrote:

> > database. [NOT TRUE--HOW IS A CRASH IN THE MIDDLE OF READING AN XML
> > FILE A PROBLEM?--RL]
>
> Updating, means writing, not reading. =A0A crash during that is very bad.=
...
>

True enough I suppos, but I've used XML extensively (outside a DB
context) and I think a crash in the middle of a update (write) would
be rare.  And I'm not sure that a crash in the middle of an UPDATE in
a DB (at the server end) would not corrupt the DB as well.

BTW, in Silverlight, SQL is not supported (as of yet) so that' s
another reason to use XML.

RL
0
RayLopez99
12/23/2009 3:03:50 PM
Start with MS SQL Server Developer (to have all the required tools).

Create a table Bidders (forget the prefixing, instead, use the plural for a 
table, singular for fields) with at least, one field, bidder name, or bidder 
id, and other fields as what belong to the said bidder, independently of any 
project (such as address, phone, ... ).

Create your table Projects, with only data that occurs once for the project 
(such as its name, where it is, when it is due to start, etc.) independently 
of any bidder.

Create a table ProjectsBidders, two fields, the project name (or project id) 
and bidder name (or bidder id). Have ONE row for each different couple (ie. 
a project can have many bidders and a bidder can bid on many projects).


Fill your tables with data. You can add relations between the tables if you 
want, but that is not strictly required for the demo (it would, for 
integrity, though).


Now, in C#. Create  new item, a "LINQ to SQL Classes" item (be sure to have 
your application targeting .Net Framework 3.5). It is mostly graphical, as 
it would be in Office-MS Access for a relationship windows: bring the three 
tables discussed here up. That's all, for the ties to the db at least.


In code (for a windows form), create an object of the LINQ to SQL class (it 
is often called a 'context' in the literature), and use LINQ over it, like:


=================
myNameSpace.MyLINQtoSQLclass dbContext = new myNameSpace.MyLINQtoSQLclass( ) 
;

     //  the LINQ to SQL class often remove the plural for you
var myQuery = from j in dbContext.ProjectsBidder
    where j.BidderID == "Acme"
    select j.ProjectID  ;


datagridView1.DataSource = myQuery ;
=================

and this is all the database- relevant (1) code you need to display, in the 
datagridView1, all the projects where the bidder is "Acme". Replace the hard 
coded constant "Acme" by a control supplying this value, to make it more 
versatile, but I don't want to obscure the code... it is, basically, as 
simple as that!


And not very hard, isn't it?

Almost as easy as using Office-MS Access


Vanderghast, Access MVP

--------------------
(1)  while it is not the WHOLE code you need to be able to run an example, 
because that would include the MyLINQtoSQLclass object too, and the code 
for the form, but those line of codes are automatically supplied for you by 
VS2008.






"mp" <nospam@Thanks.com> wrote in message 
news:e2nuqDPgKHA.2104@TK2MSFTNGP05.phx.gbl...
>I know this is vague but would appreciate any general advice to give me a 
>quick start...
> I'm new to c# and new to databases.
> I want to create two tables, tblBidders, tblProjects
> tblBidders will list companies
> tblProjects will list projects
> one view would show projects
>    pick project and see list of all bidders
> other view would show bidders
>    pick bidder and see list of all projects bidding on
>
> any tips for easiest place to start?
> eg which control to show datatable on form
> would wpf or winform be better/easier ?
> sqlite or ado.net
> etc
>
> thanks
> mark
> 

0
vanderghast
12/29/2009 7:43:31 PM
A crash, even a power failure, won't corrupt a db like MS SQL Server, 
because the pending operation would be in the log, NOT in the db itself. It 
would be, in the end, like rolling back a transaction.

MS SQL supports output in XML, so I really fail to see your point, about 
Silverlight.


It would be fine to mention that the job could be done in XML under some 
circumstances, and on that, I would have nothing to say, but to make general 
claim about something you don't know is impertinent and a blow to your 
credibility, by none other than yourself, imho.

Vanderghast, Access MVP


"RayLopez99" <raylopez88@gmail.com> wrote in message 
news:3574eff2-76fc-4816-a055-fdf87046e24d@m25g2000yqc.googlegroups.com...
On Dec 22, 6:41 pm, Family Tree Mike <FamilyTreeM...@ThisOldHouse.com>
wrote:

> > database. [NOT TRUE--HOW IS A CRASH IN THE MIDDLE OF READING AN XML
> > FILE A PROBLEM?--RL]
>
> Updating, means writing, not reading. A crash during that is very bad...
>

True enough I suppos, but I've used XML extensively (outside a DB
context) and I think a crash in the middle of a update (write) would
be rare.  And I'm not sure that a crash in the middle of an UPDATE in
a DB (at the server end) would not corrupt the DB as well.

BTW, in Silverlight, SQL is not supported (as of yet) so that' s
another reason to use XML.

RL 

0
vanderghast
12/29/2009 7:56:08 PM
On Dec 29, 2:56=A0pm, "vanderghast" <vanderghast@com> wrote:
> A crash, even a power failure, won't corrupt a db like MS SQL Server,
> because the pending operation would be in the log, NOT in the db itself. =
It
> would be, in the end, like rolling back a transaction.
>

Thanks for pointing that out--I forgot about rollback and atomic
transactions.

> MS SQL supports output in XML, so I really fail to see your point, about
> Silverlight.

Silverlight does not support SQL at the moment--not sure about release
4, but 3 and before don't.  That's my point.

>
> It would be fine to mention that the job could be done in XML under some
> circumstances, and on that, I would have nothing to say, but to make gene=
ral
> claim about something you don't know is impertinent and a blow to your
> credibility, by none other than yourself, imho.
>

No, I have used SQL extensively.  I am proficient in it.  Not as good
as you perhaps, but I can move about in it freely.

 RL
0
RayLopez99
12/31/2009 3:12:58 PM
On Thu, 31 Dec 2009 07:12:58 -0800 (PST), RayLopez99
<raylopez88@gmail.com> wrote:

>On Dec 29, 2:56�pm, "vanderghast" <vanderghast@com> wrote:
>
>> MS SQL supports output in XML, so I really fail to see your point, about
>> Silverlight.
>
>Silverlight does not support SQL at the moment--not sure about release
>4, but 3 and before don't.  That's my point.
>
There are a number of reasons why Silverlight both shouldn't and can't
directly interact with a local or remote SQL server. With some thought
and perhaps a review of what Silverlight is and how it works, many
these reasons should become obvious.

The third tutorial at silverlight.net involves accessing an SQL
database with a WCF service and LINQ.
http://silverlight.net/learn/tutorials/sqldatagrid-cs/

regards
A.G.
0
Registered
12/31/2009 4:16:56 PM
Thanks, will study that
mark

"vanderghast" <vanderghast@com> wrote in message 
news:3CC81349-73B1-4932-899F-9A4DE4AAACFA@microsoft.com...
> Start with MS SQL Server Developer (to have all the required tools).
>
> Create a table Bidders (forget the prefixing, instead, use the plural for 
> a table, singular for fields) with at least, one field, bidder name, or 
> bidder id, and other fields as what belong to the said bidder, 
> independently of any project (such as address, phone, ... ).
>
> Create your table Projects, with only data that occurs once for the 
> project (such as its name, where it is, when it is due to start, etc.) 
> independently of any bidder.
>
> Create a table ProjectsBidders, two fields, the project name (or project 
> id) and bidder name (or bidder id). Have ONE row for each different couple 
> (ie. a project can have many bidders and a bidder can bid on many 
> projects).
>
>
> Fill your tables with data. You can add relations between the tables if 
> you want, but that is not strictly required for the demo (it would, for 
> integrity, though).
>
>
> Now, in C#. Create  new item, a "LINQ to SQL Classes" item (be sure to 
> have your application targeting .Net Framework 3.5). It is mostly 
> graphical, as it would be in Office-MS Access for a relationship windows: 
> bring the three tables discussed here up. That's all, for the ties to the 
> db at least.
>
>
> In code (for a windows form), create an object of the LINQ to SQL class 
> (it is often called a 'context' in the literature), and use LINQ over it, 
> like:
>
>
> =================
> myNameSpace.MyLINQtoSQLclass dbContext = new 
> myNameSpace.MyLINQtoSQLclass( ) ;
>
>     //  the LINQ to SQL class often remove the plural for you
> var myQuery = from j in dbContext.ProjectsBidder
>    where j.BidderID == "Acme"
>    select j.ProjectID  ;
>
>
> datagridView1.DataSource = myQuery ;
> =================
>
> and this is all the database- relevant (1) code you need to display, in 
> the datagridView1, all the projects where the bidder is "Acme". Replace 
> the hard coded constant "Acme" by a control supplying this value, to make 
> it more versatile, but I don't want to obscure the code... it is, 
> basically, as simple as that!
>
>
> And not very hard, isn't it?
>
> Almost as easy as using Office-MS Access
>
>
> Vanderghast, Access MVP
>
> --------------------
> (1)  while it is not the WHOLE code you need to be able to run an example, 
> because that would include the MyLINQtoSQLclass object too, and the code 
> for the form, but those line of codes are automatically supplied for you 
> by VS2008.
>
>
>
>
>
>
> "mp" <nospam@Thanks.com> wrote in message 
> news:e2nuqDPgKHA.2104@TK2MSFTNGP05.phx.gbl...
>>I know this is vague but would appreciate any general advice to give me a 
>>quick start...
>> I'm new to c# and new to databases.
>> I want to create two tables, tblBidders, tblProjects
>> tblBidders will list companies
>> tblProjects will list projects
>> one view would show projects
>>    pick project and see list of all bidders
>> other view would show bidders
>>    pick bidder and see list of all projects bidding on
>>
>> any tips for easiest place to start?
>> eg which control to show datatable on form
>> would wpf or winform be better/easier ?
>> sqlite or ado.net
>> etc
>>
>> thanks
>> mark
>>
> 


0
mp
12/31/2009 10:12:51 PM
On Dec 31 2009, 5:12=A0pm, "mp" <nos...@Thanks.com> wrote:
> Thanks, will study that
> mark

> > "mp" <nos...@Thanks.com> wrote in message
> >news:e2nuqDPgKHA.2104@TK2MSFTNGP05.phx.gbl...
> >>I know this is vague but would appreciate any general advice to give me=
 a
> >>quick start...
> >> I'm new to c# and new to databases.
> >> I want to create two tables, tblBidders, tblProjects
> >> tblBidders will list companies
> >> tblProjects will list projects
> >> one view would show projects
> >> =A0 =A0pick project and see list of all bidders
> >> other view would show bidders
> >> =A0 =A0pick bidder and see list of all projects bidding on
>
> >> any tips for easiest place to start?
> >> eg which control to show datatable on form
> >> would wpf or winform be better/easier ?
> >> sqlite or ado.net
> >> etc
>
>

Like I said, you would do better to use XML and populate a list.  XML
is a text file and much, much easier to work with, unless you want to
do 100s of users and deal with atomic transactions.

But at this point I'm sure you're committed to learning about it the
hard way...just like I did.  It's OK, as 6 months or more learning the
ins and outs of ADO.NET and SQL is not a bad investment in the long
run.

Goodbye,

RL

0
RayLopez99
1/2/2010 2:26:47 PM
On Dec 31 2009, 11:16=A0am, Registered User <n4...@ix.netcom.com> wrote:

>
> The third tutorial at silverlight.net involves accessing an SQL
> database with a WCF service and LINQ.http://silverlight.net/learn/tutoria=
ls/sqldatagrid-cs/
>


Thank you.  Useful for those rare times that you want to use a SQL
database for read only operations from inside of Silverlight, using
WCF service.  I've added this to my toolbox for such rare occasions.

RL

0
RayLopez99
1/2/2010 2:28:10 PM
"RayLopez99" <raylopez88@gmail.com> wrote in message 
news:ccc24903-7836-4850-bda9-271dd890fdc4@l2g2000vbg.googlegroups.com...
On Dec 31 2009, 5:12 pm, "mp" <nos...@Thanks.com> wrote:
> Thanks, will study that
> mark

> > "mp" <nos...@Thanks.com> wrote in message
> >news:e2nuqDPgKHA.2104@TK2MSFTNGP05.phx.gbl...
> >>I know this is vague but would appreciate any general advice to give me 
> >>a
> >>quick start...
> >> I'm new to c# and new to databases.
> >> I want to create two tables, tblBidders, tblProjects
> >> tblBidders will list companies
> >> tblProjects will list projects
> >> one view would show projects
> >> pick project and see list of all bidders
> >> other view would show bidders
> >> pick bidder and see list of all projects bidding on
>
> >> any tips for easiest place to start?
> >> eg which control to show datatable on form
> >> would wpf or winform be better/easier ?
> >> sqlite or ado.net
> >> etc
>
>

Like I said, you would do better to use XML and populate a list.  XML
is a text file and much, much easier to work with, unless you want to
do 100s of users and deal with atomic transactions.

But at this point I'm sure you're committed to learning about it the
hard way...just like I did.  It's OK, as 6 months or more learning the
ins and outs of ADO.NET and SQL is not a bad investment in the long
run.

Goodbye,

RL

hi ray
i'm committed to try to learn everything - but it all takes time and i'm 
slow learner...have to learn how to set up xml and some forms for the ui 
part
i understand a bit about tables and fields but nothign about how i would 
emulate that in xml...
i've read bits about xml, understand a bit about the heirarchical nature, 
but am hoping to find some actual samples to get me started...it's a long 
climb up from where i'm at :-)
i appreciate your input, and everyones...just takes me a while to research 
it all, i'll search for some close samples i can maybe tweak

seems i've seen some db samples that may have a grid like display with next 
previous buttons etc that may be a head start with the db option...
i'll see if there's anything siimilar with the xml option...
this isn't a multiuser high usage project with national security 
consequences..., just simple lookup functionality in a kind of cross 
reference two tables kind of format...

thanks
mark


0
mp
1/2/2010 9:14:45 PM
On 22-12-2009 16:12, RayLopez99 wrote:
> On Dec 20, 4:55 pm, Arne Vajh�j<a...@vajhoej.dk>  wrote:
>> Most people manage to understand normalized databases fine.

> But don't forget, who said this below? And reread the OP carefully.
> That guy not say he would be reading and writing at the same time.  He
> might think he wants to do that, but 99.9% of the time people use
> databases for read only.  I rest my case Arne.

99% of database do get updated.

And a database as the one described by the original
poster certainly needs to be updated.

> If your data is readonly data, then your XML files will work fine.
> But if you need to update data, then supporting multiple concurrent
> updates to files and recovery if somethings crashes in the middle
> will be a lot of work with file and a piece of cake with
> database. [NOT TRUE--HOW IS A CRASH IN THE MIDDLE OF READING AN XML
> FILE A PROBLEM?--RL]

It is not.

But it is also mentioned as a problem when *UPDATING* data, so ...

Arne

0
ISO
1/3/2010 1:28:48 AM
On 23-12-2009 10:03, RayLopez99 wrote:
> On Dec 22, 6:41 pm, Family Tree Mike<FamilyTreeM...@ThisOldHouse.com>
> wrote:
>>> database. [NOT TRUE--HOW IS A CRASH IN THE MIDDLE OF READING AN XML
>>> FILE A PROBLEM?--RL]
>>
>> Updating, means writing, not reading.  A crash during that is very bad...
>
> True enough I suppos, but I've used XML extensively (outside a DB
> context) and I think a crash in the middle of a update (write) would
> be rare.

If loosing data being rare is good enough, then a lot of
things is possible.

But usually people care about their data.

>        And I'm not sure that a crash in the middle of an UPDATE in
> a DB (at the server end) would not corrupt the DB as well.

The DB should recover fine (if it is a database server with a log
file - MS SQLServer, IBM DB2, Oracle DB, Sybase ASE,
MySQL with InnoDB tables, PostgreSQL etc.).

That is what databases do.

> BTW, in Silverlight, SQL is not supported (as of yet) so that' s
> another reason to use XML.

SL----web service----database

works fine.

For rather obvious reasons no one would want to do:

SL----database

Arne
0
ISO
1/3/2010 1:33:28 AM
On 02-01-2010 09:26, RayLopez99 wrote:
> On Dec 31 2009, 5:12 pm, "mp"<nos...@Thanks.com>  wrote:
>> Thanks, will study that
> Like I said, you would do better to use XML and populate a list.  XML
> is a text file and much, much easier to work with, unless you want to
> do 100s of users and deal with atomic transactions.

Unless he wants to do >1 user *or* updates.

Arne

0
ISO
1/3/2010 1:35:20 AM
On Jan 2, 8:33=A0pm, Arne Vajh=F8j <a...@vajhoej.dk> wrote:
> > BTW, in Silverlight, SQL is not supported (as of yet) so that' s
> > another reason to use XML.
>
> SL----web service----database
>
> works fine.
>
> For rather obvious reasons no one would want to do:
>
> SL----database
>

That's interesting, thanks.  It explains why web services are used in
this thread tutorial by Jesse Liberty explaining SL and DBs.

RL

0
RayLopez99
1/3/2010 3:55:46 PM
On Jan 3, 3:33=A0am, Arne Vajh=F8j <a...@vajhoej.dk> wrote:
> >> Updating, means writing, not reading. =A0A crash during that is very b=
ad...
>
> > True enough I suppos, but I've usedXMLextensively (outside a DB
> > context) and I think a crash in the middle of a update (write) would
> > be rare.
>
> If loosing data being rare is good enough, then a lot of
> things is possible.
>
> But usually people care about their data.
>
> > =A0 =A0 =A0 =A0And I'm not sure that a crash in the middle of an UPDATE=
 in
> > a DB (at the server end) would not corrupt the DB as well.
>
> The DB should recover fine (if it is a database server with a log
> file - MS SQLServer, IBM DB2, Oracle DB, Sybase ASE,
> MySQL with InnoDB tables, PostgreSQL etc.).
>
> That is what databases do.
>
> > BTW, in Silverlight, SQL is not supported (as of yet) so that' s
> > another reason to useXML.
>
> SL----web service----database
>
> works fine.

I bought a book by Papa called Data Driven Services for Silverlight2
that discusses setting up a web service for SL, and I was able to set
up and consume a simple web service.  Thanks to you and A.G. of this
thread.

But I stand by my statement that XML is a cheap and easy way to mimic
a database.  For example, nearly every example I see uses XML or hard
coded values, not a SQL query and a dB, to populate a list, GridView /
DataGrid, or combo box for example.

RL
0
RayLopez99
3/2/2010 11:23:36 AM
Reply:

Similar Artilces:

what is best way to save emails?
I'm sure it's simple but I'm not sure what is the best way to save emails. Thanks for any response. This is the best way I have found. It allows you to simply double click on the stored message and it will open (providing you have Outlook open). Open Windows Explorer, create a folder on your C: (or H: if networked) (eg) emails - then resize Windows Explorer and Outlook so both fit on the desktop and simply drag and drop your mail messages to this folder/folders. Test that this works then delete mail from Outlook. This way you don't have to fiddle with export/impo...

Error can't find database, but finds it anyways
I have an access database (pass-through.mdb) which is a pass-through to another secure database called (SecureDB.mdb). This pass-through has the following code which is automatically run with a AutoExec macro and then it closed the db: Public Function PassThru() On Error GoTo PassThru_Err Dim strPath As String Dim strAccDir As String Dim strAccPath As String strAccDir = SysCmd(acSysCmdAccessDir) strAccPath = strAccDir & "MSACCESS.EXE" 'Path to database on Server strPath = Chr(34) & strAccPath & Chr(34) & " " _ & Chr(34) &a...

Exchange Server Services Fails to Start
I have a problem with Exchange Server. The Exchange Services have stopped and cannot be restarted. It gives an Error 1068, which says dependent services have not started. I checked dependOnService in the registry. It was already started. I stopped and restared the service, but it did not solve the problem. I am still getting the same error message. Any solutions or suggestions?. We are using Exchange 5.5 With SP 4 and Windows NT 4.5 Can you define "the exchange services"? Which specific services will not start? Did the password for the Exchange Service Account get changed or...

Database with Multiple Users
I am trying to create a database that has the potential for many users. I recently learned how to set securities and passwords for the database, but I still can't figure out one thing: Is there a way to have a database with multiple users, but restrict what each person sees? The way my database is set up now, all information is stored in a table, and the user would fill out the form to enter their information. These users will also have the ability to edit their information later. On both the table and the form, however, other users can still see all of the information, ...

Timesheet Database
I am looking for a database or program that we can use for employee timecards. We deal in the supported living home environment and have 9 group homes that any number of employees could work at. Employees can even work at different group homes and we need to track this. What we would like is for when an employee enters the home, they would enter there code into the computer. At the end of the week the supervisor at the house will be able to print out a report, preferrably in Excel but may be able to work from a different format, that will list the employee codes, times worked, and total...

pricing database
Hi I have just started a new business, and am quite new to computers. I.e. spread sheets and data bases. Every new customer gives me an order, and then I work out the prices. So I need to store this information as I go along as it would take to long to price up every product and service that I provide, as every customers request will differ and in the pricing. I need to build a set price list for my products, and a sample price list for the service that I provided to previous customers, to give an idea to future customers of what they get in a selected price range. What would be the bes...

Database
I'm trying to find the easiest/smartest way to create a database for a group of people. I'd like the database to meet two criteria: a. to use as a contacts list to send a group email b. to create address labels Creating address labels has been a hassle in the past. I cant' find a way to export my Outlook Express address book without exporting it in it's entirety. Without exporting the one group folder, I'm left with the task of manually selecting 50 names out of hundreds. I've tried creating a database in Excel but the mailmerge in Word won't work. An anom...

Backing up the RMS SQL database the easy way
I just wanted to share some backup and restore procedures that we now use at our store for the Microsoft RMS POS package, since we almost had a disaster a couple of months ago when our server hard drive went to lunch, fortunately for us, it was only about an hour after the store was open and we had only sold 3 items and our store employees remembered exactly what was sold so we could ring up the same transactions on the POS after the hard drive was replaced to make our store inventory correct. I don't even want to have a hard drive die at the end of the day, it could mean a whole store man...

Using CDF database to update existing CRM records
Hi, I'm starting to learn to migrate data using CDF database. In my understading, using CDF, you can only add records to CRM. Has anyone known how-to update existing CRM records via CDF? Thanks. not possible.. =/ "Tong Nguyen" wrote: > Hi, > > I'm starting to learn to migrate data using CDF database. In my > understading, using CDF, you can only add records to CRM. Has anyone known > how-to update existing CRM records via CDF? Thanks. > > > ...

Money 2004 cann't start properly
Money2004 Standard distributed with a new DELL PC bought a few days ago. When I start the program, it telled me that "Microsoft Money has encoutered a problem and needs to close". I send the error report. Then I called DELL support. They told me to uninstall the Money2004 and Norton AntiVirus, then reinstall the Money2004. But it still doesn't work. What should I do then. Thanks for your help!!! Even if I download the trial version from the microsoft website, it encounter the same problem. What's wrong? Any suggestion? Thanks! >-----Original Message----- >Mo...

A way to manually bulk update investment prices?
Is there a way to manually bulk update investment prices? Money Plus cannot find an investment I want to track so I was manually but this becomes tidious. I was hoping for a way to edit the historial prices manaully as I could write a script to do this. Are all the historical prices stored in the .mbf file? Anyone ever manually manipulated this? If so how? John Seyerle wrote: > Is there a way to manually bulk update investment prices? > Money Plus cannot find an investment I want to track so I was manually > but this becomes tidious. > > I was hoping for a way to edit t...

GP Database Structure
Hey Where can i get Database Design Structure of Microsoft Dynamics GP? Is there any Microsoft certification for Microsoft Dynamics GP and where can i get information for the same? Thanks You can get information regarding the Database Structure from various places: 1) In the System Admin Guide provided with Printable Manuals (Help>Printable Manuals>System Administrator's Guide) gives a high level overview 2) The DSDK file available on the Great Plains Install is very helpful 3) Tools>Resource Descriptions>Tables is also helpful but the information can be out of date A...

Select database record in VBA
How do I write VBA that assigns selects my database record - like I would do manually by right-clicking the linked shape and pick the record. I know whick record I am looking for because it is the shape's ID - as I have exported all my records to the database. You would need to add a Project reference to one of the data connection methods like ADO. Instance a connection object to the DSN and link the shape property to the database record. "Chuck" <Chuck@nomail.com> wrote in message news:npFDb.4186$QH1.3100@news.get2net.dk... > How do I write VBA that assigns selects ...

Compact and Repair Database
Hi all, I have just become an Access database developer. I create Access applications using Access run-time. I allow my clients to compact their data file to maximize the performance of the applications. One of my clients is complaining that they have some data lost after compacting the database. Have any of you ever experienced the loss of data after performing Compact and Repair Database? Thanks in advance, Monte Yes, it can happen. You should always do a backup before running it. Same applies for your frontend when developing. ALWAYS do a backup before decompile, compacting or usi...

Filter out tasks by Start Date
How can I set a filter so that I only see tasks that have not yet reached the Start Date? In Filter, Advanced, I have "Start Date on or before" but I don't know what to put in the Value friend. Any ideas? Thanks, Jon ...

Is there a way to get around 255 char limit on catalog merge?
I am trying to use the new catalog and mailmerge functions in 2003. In particular, being able to merge pictures in with text for our garden center signs is wonderful! However, there is a limit of 255 characters for total merge text. Our signs have rather lengthy descriptions of plants and growing conditions, so this is a problem. Is there any way around this through programming? Don't know about programming, couldn't you use two merge fields for the text? -- Mary Sauer MS MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "DBodell" &l...

There MUST be a better way...
After much futzing about with the XML/XSD for the Search.Response, I had to resort to this... PLEASE Tell me there is a better way! private void ExecuteAQuery(string strLookingForWhat) { // create the area service object SearchWebService.QueryService queryService = CreateSearchService(); const string keywordQueryTemplate = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><QueryPacket xmlns=\"urn:Microsoft.Search.Query\" Revision=\"1000 \"><Query domain=\"QDomain\"><SupportedFormats><Format>urn...

Outlook 2003 With Business Contact Manager
I receive the error "Database Creation Has Failed" when I try to use Business Contact manager for any account I create in Outlook for a specific user on my Windows XP Professional PC. Any ideas??? Does the windows account have administrative rights? -- Patricia Cardoza Outlook MVP www.cardozasolutions.com Author, Special Edition Using Microsoft Outlook 2003 ***Please post all replies to the newsgroups*** "Lopez" <anonymous@discussions.microsoft.com> wrote in message news:1238101c3f6a3$2bfc8f20$a301280a@phx.gbl... > I receive the error "Database Creati...

Opening a database 02-14-08
I have a database that in order to see the contents of the database I need to hold down the sift key to open it. Otherwise it will not let me view anything except the switchboard form. I need to change this but I did not design this database. Is there a way to remove this so that anyone can open the database and view all its contents without holding down the shift key? I am using Access 2003. Thanks in advance for any help. Best regards, dee Go to Tools | Startup and ensure that the Display Database Window box is checked. You can also have it not display the switchboard (should you wa...

Running MS Access database on the Mac
With the forthcoming Office 204 Pro and Virtual PC 7, will it be possible to run and transfer an Access database back and forth between a G5 and a PC running Win. XP? I would like to change over to the Mac but need to know whether this can be achieved. In article <ea926669.0406280615.7e454170@posting.google.com>, ptfr@pacific.net.hk (Andy Morris) wrote: > With the forthcoming Office 204 Pro and Virtual PC 7, will it be > possible to run and transfer an Access database back and forth between > a G5 and a PC running Win. XP? > > I would like to change over to the Mac bu...

Is there a quick way of assigning multiple series to a bubble char
Each series requires a three-column block of cells, one each for X, Y, and bubble size. Select the block for the first series and create the chart. Select the block for the second series, copy it, select the chart, use Edit menu - Paste Special to add the data as a New Series, with categories in the first column. Repeat as needed. If the series share the X values, you can use this sequence of columns: X Y1 B1 Y2 B2 Y3 B3 where X is the column of shared X values, Yi is the column of Y values for the ith series, and Bi is the column of bubble sizes for the ith series. - Jon -----...

Book for a windows/c++/mfc beginner...
Hi, I have previous coding experience, but not in the windows environment and not in C/C++. I have just got a copy of MS Visual C++ Express and want to learn how to code C++ for Windows. As I understand it I need to use MFC for the windows stuff, and without it Visual C++ would just be command prompt based? Is that correct? If so then I need a book that teaches me MFC and C++, preferably in the Visual C++ environment... Which is the best book/books for this? Thanks. anon418600J5 wrote: > Hi, > > I have previous coding experience, but not in the windows environment and...

Pay for 1 hours worth of work. Trying to complete database. osupratt@yahoo.com
I have a couple of issues that would take someone with the knowledge I don't have about an hour to complete. I will pay for someone to help me finish my project. Please e-mail me if you can help. Thanks. ...

deleting both duplicate entires in a database
I have a database with over 1000 entries. I need to delete the duplicates, but I need to delete both of the duplicate entries, not just one. ...

Database replication and removing names of old databases
When you start the process of synchronising one database with another, you are asked which databse you wish to synchronsie with. The dialogue box shows ALL names of databases that you have previoulsy synchronsied with and this list can become quite long (an dyou cannot always see the full names)- is there any way of getting rid of the history as it were. I realise ofcourse you can browse to the right database. =?Utf-8?B?SmFjayBhdCBSZWxheGVk?= <JackatRelaxed@discussions.microsoft.com> wrote in news:1CB9EAEE-51D3-435D-9103-1BB1D81AB851@microsoft.com: > When you start the process...