|
I want to do an application in which the pda should store the data when the user is at field work and should be updated in to my pc sql data base when the pda is connected to my pc
thanks in help
Any code please mail to chatcops007@yahoo.com
|
|
|
|
|
Hi Prasadepparla,
there are several ways to build such an application, which synchronizes data from the pda to a sql data base:
1) If you are using MS SQL Server as the pc sql data base, then you should take a look at SQL CE, which is designed for acting with data on a pda. SQL CE allows you to change the data at the pda and then to synchronize the changes with the pc sql data base.
Advantages:
- SQL CE is free and fully supported by SQL Server
- SQL CE is also supported by the CF
2) Second option is to build the application with UltraLite.NET and the Sybase MobiLink-Synchronization-Server. Basically it is the same like working with the SQL CE, but the problem is, that these Components are not free, you also have to pay for UltraLite.NET (same like SQL CE).
Advantages:
- Supported by CF
- Designed especially for snychronisation
3) Another possibility I dont know.
Hope this answers your question. If not, post again and I will try to answer your question.
Sebastian Martens
|
|
|
|
|
THANKS,
So i have to install SQL CE on my pda for usage
can i use file system to store records in pda with pda windows form and retrive them by my pc windows form and store them in sql server
please help me the namespaces which i have to use for file storing in pda.
chatcops007@yahoo.com
|
|
|
|
|
SQL Server CE uses a file-based database that you can store anywhere on your PDA. There are many ways of sync'ing this with a SQL Server database (like on a corporate server), though. When you install SQL Server CE, you can set up a replication schedule both on a schedule and on certain (limited) events, like sync'ing your Pocket PC.
You can download SQL Server CE and read about replication, .NET Compact Framework classes (defined in the System.Data.SqlCe namespace), and many other articles about the scenario you want from http://msdn.microsoft.com/SQL/SQLCE/default.aspx[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi,
this is a good question. But unfortunately I have to say, that I don't know. I've heard about this technique but for myself I didn't used it.
In my PDA project I choosed the second option.
But I think, Mr. Heath Stewart or somebody else can help you.
Sorry
Sebastian Martens
|
|
|
|
|
You should also take a look at the Application Guidance: Data Lay[^] section of the Microsoft Patterns and Practices web site, which goes into this in great detail. Especially read the Caching Architecture Guide for .NET Framework Applications[^].
For simple updates, you could use the DataSet , but I warn that with .NET 1.x the only storage format is XML (not very compact; even using a BinaryFormatter still serializes the DataSet to XML) and has its limits, such as requiring that the whole structure is loaded into memory to manipulate it and it can be slow with more data. If you need to store more than a few dozen records, then checking out better caching strategies is a very good idea.
Besides the Patterns and Practices web site articles mentioned above, there have been a number of articles covering this and similar topics on MSDN[^] that I recommend you browse or search to find them.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hello All
I am looking for a control property which works like .enable=false; without grayscaling or highlighting the control.
- or -
how to suppress keypress and mouse events for specific controls like checkbox, listbox, radiobuttons ....
Does anybody have an idea ?
Thanks in advance
fracalifa
|
|
|
|
|
In Enter Event handler of the control, try to focus on different control. like
private void comboBox1_Enter(object sender, System.EventArgs e)
{
this.textBox1.Focus();
}
Hope this works...
|
|
|
|
|
Hello Jay
this is the way I have just realized and I have also some functions to suppress keypress events, but what are you doing when there is no free field to focus to? That's all not satisfactorily !
Thanks
Some more ideas ?
|
|
|
|
|
I also agree with you. The solution is not satisfactory. I had the fix the same problem using the above solution, that is why, I posted...
BTW, If you get some different way of achieving the same. Do post the solution.
|
|
|
|
|
Hi All
I'm having a problem stated below:
I've populated a dataset from multiple tables and then bind the datagrid with this dataset. Now when the datagrid contents are changed by the user, I want to propagate these changes in the original tables. What is the most convenient way to accomplish this? I shall be very thankful for any expert advice.
Truly yours
Rashid
|
|
|
|
|
Read the SDK documentation for the DataAdapter.Update method, which describes in rather nice detail what is required and basically how it works. You use a DataAdapter -derivative - like SqlDataAdapter - with the InsertCommand , DeleteCommand , and UpdateCommand specified (in addition to the SelectCommand , which is both required and assumed since you already have a DataSet . Based on a DataRow 's DataRowState , the record will be added, updated, or deleted.
Generally you should specify an INSERT statement followed by a SELECT statement for the InsertCommand . This is because any auto-generated fields defined on the database may be different (and most likely will) than what is in your DataSet . After inserting the row, the select will make sure your DataSet contains the right data.
If you are sending this DataSet across the wire to be updated, first call DataSet.GetChanges to get a DataSet of only the changes. This is only necessary if you send the DataSet across the wire before passing it to DataAdapter (like in a typical 3-tier design). Do not call DataSet.AcceptChanges , however, otherwise all the change-tracking information is lost. DataAdapter.Update will do this upon successful completion of the update.
Read http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdatacommondataadapterclassupdatetopic.asp[^] for more information.
You can also click "Search comments" above and search for "DataAdapter", for example, for previous discussions about this. We have talked about it quite a bit in this forum over the years.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
My problem is that I can't restart my remoting server. This is how I
start the server:
m_ServerSinkProvider = new BinaryServerFormatterSinkProvider();
m_ServerSinkProvider.TypeFilterLevel = TypeFilterLevel.Full;
m_Props.Clear();
m_Props.Add("port", nPort);
m_Props.Add("typeFilterLevel", TypeFilterLevel.Full);
m_TcpChannel = new TcpChannel(m_Props, null, m_ServerSinkProvider);
ChannelServices.RegisterChannel(m_TcpChannel);
RemotingServices.Marshal(InstanceOfRemoteserverClass, "DataHandler");
This is what I do when I stop the server:
RemotingServices.Disconnect(InstanceOfRemoteserverClass);
ChannelServices.UnregisterChannel(m_TcpChannel);
When I try to start the server again, I do the start part again. When
I restart, I get an exception: only one usage of each socket address
(protocol/network address/port) is normally permitted. This is caused
by:
m_TcpChannel = new TcpChannel(m_Props, null, m_ServerSinkProvider);
This exception will occur only if my client has connected atleast
once.
The reason I need to create new TcpChannel every time server is
started is that the user can decide which port the server listens. So
the user can start the server with port 9000, stop the server, change
port to 9001 and start the server again. Or it can just stop and start
the server with the same port for some reason.
So how can I design the server so that it can be started and stopped
as many time as needed? Can I change the port in the created
m_TcpChannel without creating a new instance of it everytime?
Any help will be highly appreciated.
Thank you
|
|
|
|
|
At first glance, it would seem the problem is that you're not closing the first TcpChannel . When you instantiate a new one, the first TcpChannel remains active until the GC finalizes it - assuming nothing else is referencing it. This will happen when 1) your machine is idle, 2) when memory is or is nearly exhausted, or 3) when you call GC.Collect (not a good idea since this is a synchronous (i.e., blocking) call that may take a while). Be sure to call TcpChannel.StopListening .
You actually shouldn't need to re-allocate the channel, though. IF the remoting object is not listening the channel does nothing. You would have an open port, but a port that goes no where. Just something to consider.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Thanks a lot for helping. I added TcpChannel.StopListening, but it didn't work. The TcpChannel does remain active (as you assumed), because it is a member variable. So the old TcpChannel exists when I create a new instance of TcpChannel to the same member variable. I'm a neebie to remoting (and to also C#), so I don't really know what's going on, so the reason for the member variable is that I can use it to UnregisterChannel when I disconnect. Can I avoid using member variable and get the current tcpchannel somehow for unregistering or what should I do when I disconnect in order to be able to reconnect? Also, could I change the port in the current TcpChannel when it is not registered or listening with out creating a new instance of it?
Thanks
|
|
|
|
|
Re-instantiating it creates a new instance and assigns that instance to the field ("member variable" as you called it, which is incorrect, BTW). The old field - if nothing else references it - will be finalized (destroyed) eventually, but there's no garuantee when). Don't re-instantiate it.
Actually, you should consider using .config files to configure remoting. If you ever need to change properties, a server address, or the remoting object base location with how you're doing it now, you would have to change your code, re-compile, and test it all over again. If you use .config files the RemotingConfiguration.Configure method you get everything you did without the hastle and in a way that you can change just by editing the .config file (an XML file) and re-starting the application. If you implement two different AppDomains with one watching for changes to the file, you can take-down the other AppDomain that hosts the remoting object and re-start it. This is basically how ASP.NET works (when you edit Web.config the ASP.NET web application is reloaded, or all ASP.NET web applications are reloaded if you edit the machine.config or the virtual host's root Web.config file).
I recommend picking up a good book on Remoting, like Microsoft .NET Remoting[^] (for beginners and intermediate developers) from MS Press and/or Advanced .NET Remoting[^] from Ingo Rammer.
.NET Remoting is complex and very abstract. Either of these books can really help sort-out the details and give you ideas about how to better implement a remoting solution.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I have a usercontrol with 2 basic .NET controls (one label and one textbox for example).
When i drop such a control on a form in design time, everything is fine, i can click on it anywhere to select it, resize it, etc.
But now when i try to drop a panel on the form and drag/drop my UserControl into the panel, then i can't select the UserControl anymore. Designer seems to be trying to select the inner control (the textbox or the label) but also fails. When i click on the textBox part of the usercontrol, then i can type text in, as if textbox was in runtime.
I'd have thought it would be a known issue, but i couldn't find anything about it, nor could i find a workaround. Could anyone help, please ?
Thannk you !
Etienne.
|
|
|
|
|
just check in the Form Designer Code whether the following line is present?
this.panel1.Controls.Add(this.userControl1);
where panel1 and userControl1 are the panel's name and userControl names respectively.
I tested the scenario explained by you..No problem at my end..........
|
|
|
|
|
Interesting... The issue is the same on a co-worker computer, but he has the same VS version.
I made an archive with 2 projets (Solution containing both is in Test-Bug) showing the issue.
There is a form in Test-Bug, with a panel, which contains a UserControl. Now if i select the UserControl, drag it out of the panel, parent changes and is serialized ok in InitializeComponents. (i do have the right "Controls.Add" line) But then if i de-select usercontrol, and click on the textBox again, it won't select the UserControl (cursor changes as if over a textbox, too), but the focus will go inside the textBox, allowing to type in text at design time.
Once this happened, if i quit the solution and load it back, everything is back to normal.
Thanks a lot for looking into this, i really don't understand.
Here's a link to the sample code i made :
UserControl bug ?
Etienne.
|
|
|
|
|
I do not have winRaR. that is why, I could not un-concompressed your userControl,
whereas, I re-checked the my demo userControl,
1.It does allow to write in the TextBox. But the changed text is reset after The project is being compiled.
2.It allows to select the userControl, in both the cases (user control being kept inside the panel,or outside the panel).
I am sorry, I could not minutely tested the scenario, previously....Seems to be a bug..
|
|
|
|
|
Again re-checked using UpDownControl inside an userControl. When it is dragged into the panel or dragged out of the panel. The constituent controls of the userControl starts behaving similar to the run-time.
When the project containing the userControl is being re-compiled. The problem goes.......strange.....!!!
|
|
|
|
|
Thanks a lot for taking so much time on this.
Indeed, whatever the control you have inside the UserControl is, it will begin to act as if in run-time. And all is back to normal upon recompilation or quit/reload.
Does anyone know a work-around ? any code to add to the UserControl and/or Designer ? Cause it's a pain having to re-compile so often when creating forms in design mode...
Anyway, thanks again Jay ! (look into 7-zip, it's free and handles rar files)
Etienne.
|
|
|
|
|
I found a workaround that works for me :
Override OnParentChanged in your UserControl, and for every control contained in it, remove it and add it again. You may limit this code section to DesignMode, so it won't happen at runtime.
Etienne.
|
|
|
|
|
Great.....It works...
By the way, Is this bug being already detected by the Microsoft? or being recorded by the Microsoft?
|
|
|
|
|
Hi everybody!
I've performed recording wave sound in low level (by API function) but I have a problem. In WndProc function, the MM_WIM_DATA message is occured but the buffer is not filled. Could you help me.
Thanhks
Hung
|
|
|
|
|