473,387 Members | 1,693 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,387 software developers and data experts.

Build ADO.NET ResultSets for Merge Replication.


Hi all

I am developing in C#, CF2 and SQL Mobile.

Currently my app is using Merge Replication. This is all working well.

I have now decided to try and use Result sets in my application but I am not
sure on how to handle this.

I have gone through examples on how to build a result set, but my
application creates the Database the first time it syncs.

How do I build a result set for a database that does not exist yet?

Thanks,
ink
Mar 19 '07 #1
6 2125
I'm confused. How would SQLCe (or any SQL Engine) build a resultset without
a source of data?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"iKiLL" <iK***@NotMyEmail.comwrote in message
news:eT**************@TK2MSFTNGP02.phx.gbl...
>
Hi all

I am developing in C#, CF2 and SQL Mobile.

Currently my app is using Merge Replication. This is all working well.

I have now decided to try and use Result sets in my application but I am
not sure on how to handle this.

I have gone through examples on how to build a result set, but my
application creates the Database the first time it syncs.

How do I build a result set for a database that does not exist yet?

Thanks,
ink


Mar 19 '07 #2
ink,

You have to have the database before you can connect to it, but you can
write code that creates a SqlCeResultSet programmatically once you have that
connection. Is this what you want to do?

--
Ginny
"iKiLL" <iK***@NotMyEmail.comwrote in message
news:eT**************@TK2MSFTNGP02.phx.gbl...
>
Hi all

I am developing in C#, CF2 and SQL Mobile.

Currently my app is using Merge Replication. This is all working well.

I have now decided to try and use Result sets in my application but I am
not sure on how to handle this.

I have gone through examples on how to build a result set, but my
application creates the Database the first time it syncs.

How do I build a result set for a database that does not exist yet?

Thanks,
ink

Mar 19 '07 #3
Hi Ginny

Yeah this is what i am wanting to do but i was hoping to create it in the
IDE as an XML file so that it is Strong typed.

ink

"Ginny Caughey [MVP]" <gi******************@wasteworks.comwrote in message
news:61**********************************@microsof t.com...
ink,

You have to have the database before you can connect to it, but you can
write code that creates a SqlCeResultSet programmatically once you have
that connection. Is this what you want to do?

--
Ginny
"iKiLL" <iK***@NotMyEmail.comwrote in message
news:eT**************@TK2MSFTNGP02.phx.gbl...
>>
Hi all

I am developing in C#, CF2 and SQL Mobile.

Currently my app is using Merge Replication. This is all working well.

I have now decided to try and use Result sets in my application but I am
not sure on how to handle this.

I have gone through examples on how to build a result set, but my
application creates the Database the first time it syncs.

How do I build a result set for a database that does not exist yet?

Thanks,
ink


Mar 19 '07 #4
While you can use the IDE to create a database and populate the schema,
there is no scripting support for SQLCe (yet) that would build an SQL DDL
script. Once the database is built, the IDE can build ST TableAdapters to
manage the data--but you need a populated database first. I have examples of
doing all of this in the IDE and code in my EBook.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"iKiLL" <iK***@NotMyEmail.comwrote in message
news:O%****************@TK2MSFTNGP02.phx.gbl...
Hi Ginny

Yeah this is what i am wanting to do but i was hoping to create it in the
IDE as an XML file so that it is Strong typed.

ink

"Ginny Caughey [MVP]" <gi******************@wasteworks.comwrote in
message news:61**********************************@microsof t.com...
>ink,

You have to have the database before you can connect to it, but you can
write code that creates a SqlCeResultSet programmatically once you have
that connection. Is this what you want to do?

--
Ginny
"iKiLL" <iK***@NotMyEmail.comwrote in message
news:eT**************@TK2MSFTNGP02.phx.gbl...
>>>
Hi all

I am developing in C#, CF2 and SQL Mobile.

Currently my app is using Merge Replication. This is all working well.

I have now decided to try and use Result sets in my application but I am
not sure on how to handle this.

I have gone through examples on how to build a result set, but my
application creates the Database the first time it syncs.

How do I build a result set for a database that does not exist yet?

Thanks,
ink



Mar 19 '07 #5
There is a designer in VS 2005 that you can use to create strong typed
SqlCeResultSet classes. You follow the same steps that you use to create a
typed dataset, except you change the property on the xsd file from
MSDataSetGenerator to MSResultSetGenerator. Probably you found this already,
and probably you also found that it needs the SDF file already so it can
read the schema to generate the classes.

One approach would be to pull the table you want so now you have a SQLCE
table, but since you're going to have to update your typed resultset code
each time there might be changes in the schema of the table you download, it
might end up being simpler to use untyped resultsets instead. The downside
of doing this is that you don't get the Intellisense assistance and data
casting that the strong typed resultset provides. The performance is going
to be about the same either way since the typed resultsets are very
lightweight.

--
Ginny
"iKiLL" <iK***@NotMyEmail.comwrote in message
news:O%****************@TK2MSFTNGP02.phx.gbl...
Hi Ginny

Yeah this is what i am wanting to do but i was hoping to create it in the
IDE as an XML file so that it is Strong typed.

ink

"Ginny Caughey [MVP]" <gi******************@wasteworks.comwrote in
message news:61**********************************@microsof t.com...
>ink,

You have to have the database before you can connect to it, but you can
write code that creates a SqlCeResultSet programmatically once you have
that connection. Is this what you want to do?

--
Ginny
"iKiLL" <iK***@NotMyEmail.comwrote in message
news:eT**************@TK2MSFTNGP02.phx.gbl...
>>>
Hi all

I am developing in C#, CF2 and SQL Mobile.

Currently my app is using Merge Replication. This is all working well.

I have now decided to try and use Result sets in my application but I am
not sure on how to handle this.

I have gone through examples on how to build a result set, but my
application creates the Database the first time it syncs.

How do I build a result set for a database that does not exist yet?

Thanks,
ink


Mar 19 '07 #6
Again Ginny, thanks for the response.

It is as you said in the first paragraph. And that is exactly how this
question came about.

I will I am not to bothered about the intellisense. And if there is no real
performance implication then i may as well use an untyped Result set.

Thanks,
ink

"Ginny Caughey [MVP]" <gi******************@wasteworks.comwrote in message
news:31**********************************@microsof t.com...
There is a designer in VS 2005 that you can use to create strong typed
SqlCeResultSet classes. You follow the same steps that you use to create a
typed dataset, except you change the property on the xsd file from
MSDataSetGenerator to MSResultSetGenerator. Probably you found this
already, and probably you also found that it needs the SDF file already so
it can read the schema to generate the classes.

One approach would be to pull the table you want so now you have a SQLCE
table, but since you're going to have to update your typed resultset code
each time there might be changes in the schema of the table you download,
it might end up being simpler to use untyped resultsets instead. The
downside of doing this is that you don't get the Intellisense assistance
and data casting that the strong typed resultset provides. The performance
is going to be about the same either way since the typed resultsets are
very lightweight.

--
Ginny
"iKiLL" <iK***@NotMyEmail.comwrote in message
news:O%****************@TK2MSFTNGP02.phx.gbl...
>Hi Ginny

Yeah this is what i am wanting to do but i was hoping to create it in the
IDE as an XML file so that it is Strong typed.

ink

"Ginny Caughey [MVP]" <gi******************@wasteworks.comwrote in
message news:61**********************************@microsof t.com...
>>ink,

You have to have the database before you can connect to it, but you can
write code that creates a SqlCeResultSet programmatically once you have
that connection. Is this what you want to do?

--
Ginny
"iKiLL" <iK***@NotMyEmail.comwrote in message
news:eT**************@TK2MSFTNGP02.phx.gbl...

Hi all

I am developing in C#, CF2 and SQL Mobile.

Currently my app is using Merge Replication. This is all working well.

I have now decided to try and use Result sets in my application but I
am not sure on how to handle this.

I have gone through examples on how to build a result set, but my
application creates the Database the first time it syncs.

How do I build a result set for a database that does not exist yet?

Thanks,
ink


Mar 20 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Karthik | last post by:
Hi, We have setup a publisher and a distributor in SQL 2000 running SP3. Alongwith this we have setup a merge replication agent and its running successfully inside the same network. I allow...
0
by: Gert Wurzer | last post by:
Hi! I hope anyone can help me with this very important problem! Since configurig one subscriber in our merge replication scenario to a subscribing publisher we get a lot of merge conflicts...
0
by: hd | last post by:
Are there any standard approaches used to purge records from database in merge replication senario ? We are using merge replication between two sql server 2000 databases. These databasess have...
3
by: jaykchan | last post by:
One of the table that is in a merge replication somehow is missing an index. Strangely, only the table in one of the subscriber of the merge replication is missing the index; another subscriber and...
3
by: Robin Tucker | last post by:
I have a product that sits on a main server and wish to implement functionality to allow salesmen to come along, pick up a snapshot of the database, go away and maybe modify/add to it and then come...
1
by: EoRaptor013 | last post by:
We have a situation almost exactly like that in the MS documentation vis a vis peer-to-peer replication. We have three servers and three user groups, one each in Chicago, New York, and Bermuda....
0
by: sk.rasheedfarhan | last post by:
Hi all, I set the configuration for Merge replication for Subscription on one database and I have created the Merge replication for publication on another machine. And I updated columns of...
8
by: Benzine | last post by:
Hi, I have an issue with my replication at the moment. I will try to describe the scenario accurately. I am using MS SQL 2000 SP4 with Merge Replication. Subscribers connect to the publisher...
0
by: ho.horace | last post by:
Dear All, I am using SQL 2005 as pub and SQL EXPRESS as sub with Merge replication. Got the following error message The schema script 'CD_InTransit_v_153.sch' could not be propagated to the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.