|
In VS.NET 2005 right click a .cs file and chose "View Class Diagram".
http://stefanprodan.wordpress.com
|
|
|
|
|
They may have removed the option in VS 2005 in favour of the built-in class diagrams feature?
Kevin
|
|
|
|
|
Hi, all. I am trying to use a DataGridView to add records from multiple, related tables in a database. So far, I have been able to bind the DataGridView to a BindingSource that consists of a query, and to display and navigate through them using a BindingNavigator.
I can't seem to figure out how to add a record the needs to populate multiple tables in the DB.
When I click the Add New Item button on the BindingNavigator (and add data for all required fields), the record appears on the DataGridView, but it is not being written to the DB. If I close the app and run it again, the new record is not there. The same happens when deleting a record using the BindingNavigator's delete button. Is it being written to the query that is contained in the bindingsource only? Can someone assist?
Regards,
|
|
|
|
|
I have posted this question, but received no answers yet, even after considerable activity in the msg board. Is this not the right place to post such a question? Please advise, as it is the first time I post to this board.
Thanks
Juan
|
|
|
|
|
I vaguely remember seeing this exact same subject line in two or three other forums, so that's probably why it didn't get answered.
ramakaniel wrote: but it is not being written to the DB.
It won't be until you call Update on some dataadapter to write the data back out to the database. A DataSet is an in-memory copy of the data, not a reference to the database itself.
|
|
|
|
|
Ok, I have a query table adapter that represents the query displayed on the datagridview, pulling data from multiple, related tables, as such:
TITLE AUTHOR PROGRAM...CATEGORY
Is this the dataadapter you refer to? If so, I does not have an Update method. Please clarify or point me to a tutorial that details this.
Regards,
Juan
|
|
|
|
|
If the TableAdapters do not have an Update, then, from MSDN here[^]:
TableAdapter Update Commands
The update functionality of a TableAdapter is dependent on how much information is available based on the main query provided in the TableAdapter Wizard. For example, TableAdapters that are configured to fetch values from multiple tables (JOINs), scalar values, views, or the results of aggregate functions are not initially created with the ability to send updates back to the underlying database.
The reason you can't call update is because the TableAdapter can't update multiple tables from a single query.
You'll either have to supply the SQL and VB.NET code in the TableAdapters to update the individual tables yourself, or scrap the tableadapter and write the complete SQL and VB.NET code for all the operations you want on the tables involved.
|
|
|
|
|
I've successfully played around with WMI to interrogate random computers on my network in an application on my workstation, and I thought it would be a cool idea to make a program like that in the compact framework so that I could do it from my PPC. Unfortunately, the System.Management namespace doesn't exist in the compact framework. Does anyone know of or can point me in the right direction to a way to querying WMI from the compact framework? Any help is appreciated, thanks in advance
|
|
|
|
|
The CF doesn't support WMI at all. It also doesn't support ASP.NET, Enterprise Services, Message Queues, COM Interop, the OleDb and ODBC data providers, generic serialization, asynch delegates, Remoting, Printing, some XML stuff, ... and some other stuff I can't remember.
No, you can't use WMI form the Compact Framework. Windows CE doesn't have the support for WMI, so it's not included in .NET CF.
|
|
|
|
|
But is there some kind of work-around, maybe a library that someone has made or a link to a way to make a library? Because it works with queries there seems like there should be a way to hack a way to do it, even if I have to do the socket code myself.
|
|
|
|
|
Nope.
WMI has two parts, a server AND a client portion. The server runs on any Windows machine, with WMI installed, compiling all the data from the WMI Providers and serving it up through something akin to a small SQL server. This part doesn't exist in Windows CE at all.
The client side is also on every machine that has WMI installed. This part is a COM-based library that formats requests, talks to the WMI Server, processes results, handles application interaction, and all kinds of other stuff on WMI collections of WMI objects. This part ALSO doesn't exist in Windows CE.
There's nothing you can do about this unless you find someone who has written a WMI Client library for Windows CE. I haven't been able to find one...
|
|
|
|
|
:/, that's unfortunate... it seems like it would be a highly arduous task to do. I suppose its back to the drawing board; thank you very much for your assistance.
|
|
|
|
|
Hi all,
I'm trying to open a socket between a device running .NET CF 1.0 and a PC. The code that sets up the socket (in C#) looks something like this:
TCPClient cli = new TCPClient("192.168.100.150", 11240)
The host runs on 192.168.100.150 and listens on port 11240. When I run the above code on a device with .NET Framework 2.0, everything works fine but when I run it on a device running .NET Compact Framework it throws a System.Net.Sockets.SocketException with error code 11001 (which translates to "No such Host is known").
This seems to have something to do with the dotted IP Address because when I provide a url like "www.google.com" it works (but then throws another exception because you can't connect to google on 11240).
Would anyone have an idea why TCPClient wouldn't accept a dotted IP Address and how to get around it?
|
|
|
|
|
No idea why it's not working, but use the TcpClient constructor which takes an IPEndPoint instead.
TcpClient cli = new TcpClient(
new IPEndPoint(
IPAddress.Parse( "192.168.100.150" ),
11240
)
); The TcpClient constructor that takes a string is documented to accept a DNS name. A string representation of an IP address is not a DNS name.
|
|
|
|
|
Thanks Mike, that's good to know and I will certainly use this method in future, it just seems better.
However, this does not seem to relate to my problem. I have figured out in the mean while that it is not the dotted IP address causing the problem but rather the fact that I'm trying to access a computer on the local network.
I can open a socket to www.google.com for instance (by specifying either the IP address or the DNS name) but when I specify an IP address on the local network it doesn't work.
I can ping that address though so it's not a connectivity issue.
|
|
|
|
|
Is this a Windows Mobile 5.0 or 6 device connected to the desktop via ActiveSync?
ActiveSync doesn't actually route packets from the device. Instead it acts as a proxy - all DNS lookups resolve to the PC's IP address (of the PC end of the ActiveSync connection). ActiveSync then forwards the requests to the actual target server and vice-versa. However, it doesn't work for IP addresses.
Windows Mobile 5.0 turns off all other network interfaces and drops any dial-up connections (e.g. GPRS/EVDO mobile data) when connected to ActiveSync. Your only connectivity option is via the desktop passthrough.
Windows Mobile 6 allows you to control this - there's a checkbox in ActiveSync's Connection Settings labelled "Allow wireless connection on device when connected to the desktop" which I think is unchecked by default.
|
|
|
|
|
Hmm, that's good to know. The device runs Windows CE.NET 4.2 so I can only assume that your scenarion for version 5.0 will apply (if not worse).
Be that as it may, I did think of disconnecting ActivSync before attempting a socket connection and it still didn't work. However, in the mean while I've found another way of setting up a socket. In stead of using System.Net.Sockets.TCPClient I tried using System.Net.Sockets.Socket which required a few more specific parameters but ultimately worked like a charm.
My code now looks something like:
using System.Net;
using System.Net.Sockets;
Socket mySocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
EndPoint myEndPoint = new IPEndPoint(IPAddress.Parse("192.168.100.150"), 11240);
mySocket.Connect(myEndPoint);
I'd be very curious to know why this works but the TCPClient failed. But at least I've got this stumbling block out of the way now.
|
|
|
|
|
I need to write a debugger which will execute an process and I need to get notification when that process will write or modify any thing on the hard disk. Can we keep watch on any process for getting info when that process will write to hard disk? I have read something about "Win32 Debug API". Can any one guide me or give me any demo code for this?
|
|
|
|
|
chandni_chandrakant_maheta wrote: I need to get notification when that process will write or modify any thing on the hard disk.
There is no such notification. You'd have to inject hooks into all the I/O functions in the Win32 API to handle this, kind of like how FileMon does it.
chandni_chandrakant_maheta wrote: Can any one guide me or give me any demo code for this?
You probably won't find any specific to this application. No, I don't have any links or examples myself.
|
|
|
|
|
Thanks for your reply.
Dave Kreskowiak wrote:
You'd have to inject hooks into all the I/O functions
Can you please give me any sample code or any article from where I can know how to inject hooks for an I/O function.
|
|
|
|
|
|
Hi.
This morning tried to run an aplication running under .NET 1.1 at the same time i was developing something in 2.0. But all sites configured in IIS6 gave me errors, for .NET framework 1.1 version. I made a restart (iisreset) and launched first 2.0 web site containing all aplications under that framework version, and all of them worked.
If i repeat the process but first initialize aweb aplications under 1.1 net framework website, those aplications works but the ones on 2.0 net framework doesn't.
This is normal? I'm a newbie yet, but i'm hungry to learn more.
Thanx in advance everybody.;P
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
|
|
|
|
|
You have to make 2 different Application Pools(App1 and App2), set the ASP.NET 1.1 sites to run on the App1 pool and ASP.NET 2.0 on the App2 pool.
http://stefanprodan.wordpress.com
|
|
|
|
|
Thank you Stefan. I guess i need less gaming and more IIS training. I'll make sure to learn begining from the basis and not to just jump into the last chapert.
Thanks again mate.
Leistath;)
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
|
|
|
|
|
The fundamental problem here is that you can only load one version of the Common Language Runtime (CLR, the actual execution engine of the .NET Framework) into a process. The first version to load wins - subsequent attempts to load a different version are simply ignored.
IIS 6.0 uses the W3WP.EXE (W3 [World Wide Web] Worker Process) executable to run ASP.NET code. It knows how to host the CLR. IIS 5.x does not natively understand .NET and uses a different model, loading a DLL into its regular worker process, which in turn launches an ASPNET_WP.EXE process, but significantly, different versions of .NET launch their own separate worker processes so the clash does not occur.
So what you have to do is to ensure that the .NET 2.0 and .NET 1.1 applications do not share a worker process. You do this, as the other reply says, by defining a new application pool and assigning the .NET 2.0 applications to that. Or you can do it the other way round if you like, placing the 1.1 applications in the new application pool.
|
|
|
|