Re: code sharing for sql2k and sql-ce
From: Darren Shaffer (darrenshaffer_at_discussions.microsoft.com)
Date: 12/15/04
- Next message: darek_at_m-core.pl: "Re: "sort sequence is not valid" while creating db"
- Previous message: almir: "Re: code sharing for sql2k and sql-ce"
- In reply to: almir: "Re: code sharing for sql2k and sql-ce"
- Next in thread: almir: "Re: code sharing for sql2k and sql-ce"
- Reply: almir: "Re: code sharing for sql2k and sql-ce"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Dec 2004 12:26:48 -0700
I think the idea of coding against an interface is perfect given what you're
trying to do.
I'd expose methods through the interface like "ExecuteQuery",
"ExecuteNonQuery",
and have overloads for the ExecuteNonQuery that allows one to do
transactional and
non-transactional updates/inserts. You should not have to put SQL in your
web-based
code - there is no way you are going to access SQL CE from ASP.Net pages, so
why
not treat the web interface to your SQL Server database as a separate part
of your
architecture and push the SQL into Stored Procedures or some middle-tier
entity?
-Darren Shaffer
"almir" <kazazic@gmail.com> wrote in message
news:1103131168.324595.228630@c13g2000cwb.googlegroups.com...
> Thank you Darren,
>
> I am not using any but basic data types (varchar and int) so I suppose
> this is not going to be a problem and database is not going to be
> big(each user will have only his/her data) and no complicated queries,
> which should mitigate index problem .
>
>
> I made a small data access layer which is working with IDbCommand , and
> depending of environment I am returning SqlCeCommand or SqlCommand but
> using IDbParameter could produce some really strange bugs as position
> of parameter must be the same as cmd.Parameters.Add(); which is
> something I do not want to test.
>
> So it seams that I will have to use sql statement in source code, only
> this way I can use same statements and code for both DBMS and this is
> not good thing to do in a web application (which is another place where
> this app is going to be used) But it seams that I will have to do it
> this way, or write it twice.
>
>
> Are this things ok (as this is my first project in CE environment)
>
> Thank you once more
> Almir
>
> Ps
> I am using c# but this should make no difference
>
- Next message: darek_at_m-core.pl: "Re: "sort sequence is not valid" while creating db"
- Previous message: almir: "Re: code sharing for sql2k and sql-ce"
- In reply to: almir: "Re: code sharing for sql2k and sql-ce"
- Next in thread: almir: "Re: code sharing for sql2k and sql-ce"
- Reply: almir: "Re: code sharing for sql2k and sql-ce"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|