Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I searched everywhere possible and I could only find how to create a client/server chat application in WPF.

But what I need is the client/server WPF application which uses the WCF feature for connectivity.

Also it should be a MS Access database which should be accessible to client through server and this access should be provided by VB6 client server.

This VB6 client/server also uses the C# connectivity for the data transfer.

If anyone could help me to get this thing started, it would be really helpful for my work. I am screwed if this thing does not work in a week's time.

I just need a start for the connection and rest I can take care of.....

Please someone help......... please.........
Posted
Comments
[no name] 1-Apr-11 13:57pm    
You're screwed anyway, this combination of technologies will make any application unreliable and unmaintainable.

However, any problem can be solved with another layer of indirection
ankitjoshi24 1-Apr-11 14:11pm    
Thank you Mark........ but this is what my company needs. So is there a way you could help me?????
#realJSOP 1-Apr-11 14:28pm    
Your only recourse at this point is using Liquid Nitrogen.
Wendelius 1-Apr-11 14:48pm    
Shaken, not stirred :)

To add to SA's answer also reconsider the usage of MS Access. I know there are reasons why it might be a 'desirable' solution but there are alternatives. Especially if you expect that:
- the amount of data is going to grow
- user amounts grow
- (good) security is needed etc.
then for example SQL Server Express edition could be a feasible alternative. Later when the requirements change is much more easier to just upgrade the SQL Server edition than to make modifications to the application to support another database software.
 
Share this answer
 
Comments
ankitjoshi24 1-Apr-11 14:15pm    
Hey

The thing is that my company already has data in MS Access. First we had a single computer software which was in VB6. Now using these resources, we have to create a client/server in C# so I have no option but to utilize these resources.

I can do that, rather I have managed to do most of the things but just not able to do the client/server connectivity for the forms. This is because the company needs me to use the WCF services, which I am totally unaware of.

Is there a way to connect the WPF forms using WCF????
Wendelius 1-Apr-11 14:22pm    
I'm a bit confused, so the problem is to connect to a WCF service, not to the database? If that's the case I'd suggest that you have a look at: http://msdn.microsoft.com/en-us/library/ms734712.aspx. However, WCF needs an IIS to run on and this architecture wouldn't be a client-server... If you're having trouble to connect to Access Database then use have a look at OleDbConnection class: http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection(v=VS.100).aspx and for the connection string: http://www.connectionstrings.com/access
ankitjoshi24 1-Apr-11 14:24pm    
Hi
I am able to connect to the Access database. I don't need to connect to the WCF server. I need the WCF architecture to be used for connecting the WPF client/server application. Well I will go through the link you have specified and will let you know if that helps.

Just to simplify, my company does not require socket connection for the client/server architecture. So I was wondering if there is any other way and I found that WCF could be useful.

Do you have any idea how to do this in WPF C# ????
Wendelius 1-Apr-11 14:45pm    
Could you explain a bit more what you would like to do from WPF using c#. I'm sorry, this is probably a language problem but I didn't quite get the actual issue.
ankitjoshi24 1-Apr-11 14:53pm    
1. MY WPF forms will only display the contents from the database.

2. WCF would be used to connect the client and the server

3. VB6 (ActiveX.exe) would be used to send and receive the database.

I hope that is clear now and I hope that someone could come up with atleast a solution for my 2nd point.

The 1st and the 3rd part are almost done by me.
To save your project from infinite disaster, exclude VB6.

By the way, using VB6 in .NET is practically impossible, unless you make an ActiveX project, but ActiveX is also best avoided, especially with VB6. This technology is dying out. Don't waste your time.
Here is why. .NET provided comprehensive ADO.NET with direct mapping of all major databases. And all decent databases provide ADO.NET binding, and it has nothing to do with COM. For starters, see http://en.wikipedia.org/wiki/ADO.NET[^] and the references from this document. Start from here: http://msdn.microsoft.com/en-us/library/h43ks021(v=vs.71).aspx[^].

No, don't waste your time. A measurable code "reuse" you think you gain with your legacy VB6 stuff will turn out to be a support nightmare — at best.

—SA
 
Share this answer
 
v2
Comments
Wendelius 1-Apr-11 14:09pm    
So true. My 5.
ankitjoshi24 1-Apr-11 14:12pm    
I have included the VB6 ActiveX.exe file by referring it in C#. So it is possible to include VB6 in .NET framework. Now if you could just help me to connect the WPF client/server using WCF services, it would be really helpful. I can manage the database part.......
Sergey Alexandrovich Kryukov 1-Apr-11 14:16pm    
Oh, sure, in this sense you're right. OK, avoid ActiveX as well, even though it is less fatal than VB. Sorry for the confusion...
--SA
ankitjoshi24 1-Apr-11 14:17pm    
I cannot avoid ActiveX.... Company requires me to use it..... Now is there any solution????
Sergey Alexandrovich Kryukov 1-Apr-11 14:24pm    
OK, see my update. This is a real solution: ADO.NET, forget anything else, for your own sake.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900