|
Chen,
From what I've read, you'll have to wrap the Win32API calls yourself and probably make use of Unsafe code in your application to get this working.
Memory Mapped Files are not directly supported in .NET ...
D.
|
|
|
|
|
I like to get help for the below sql statement.
I use two oledb connection objects to connect to 2 different sqlserver - DB's.
NewSQL = insert into sample "(SELECT * from sample1)
In the above "insert" statement the table 'sample' belongs to one conn-object and table 'sample1' belongs to another conn-object.
can anyone give me the solution.
thankyou
kaling
|
|
|
|
|
You cannot use two connections in one SQL statement in .NET. The SQL statement goes in one Command object, which is attached to one connection.
I am assuming you are using SQL Server 6.5 or previous (otherwise you should really be using a SqlConnection and not an OleDbConnection)
I am assuming this is not a one time operation. There are better solutions for copying data between two databases than this.
Okay - A solution (note: I didn't say "THE solution", just "A solution")...
Create a data reader to suck out the data from sample1. On each Read() iteration create an insert command to inject a record into sample.
Another solution may be, and I say "may be" because I've never tried it, to use a fully qualified table name: server_name.database_name.owner_name.table_name
I hope this helps.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
|
|
|
|
|
Another possible solution to do this is to create and use data VIEWS. Simply create a view that combines data from the two SQL servers, and then query agains it.
Peter
|
|
|
|
|
Thank You friends, for ur support in solving the problem.
kaling
|
|
|
|
|
Hi All,
I am into webdevelopment with ASP, .NET and stuffs. I am running my PC with XP OS. Can I maintain the same ot shall I change to 2000 Adv Server?
The problem here is I cant run SQL server 2000 with full server option.
Please suggest me... to be or not to be with XP?? I have plans to go for the 2003 server later (after 6 months)
I was born intelligent Education ruined me!.
|
|
|
|
|
My dev box has Windows XP with IIS and the developer version of SQL server installed for tests and sample projects. Real projects run off our Windows 2000 Server (not advanced) box with SQL server installed. Our hosting boxes are also Windows 2000 Server and they work fine.
Remember you can run SQL server on a non-server Windows installation if you have the developer edition.
regards,
Paul Watson
Bluegrass
South Africa
Marc Clifton wrote:
"organically fed captivity free regurgitated bee nectar" (honey) on dieting.
Crikey! ain't life grand?
|
|
|
|
|
Paul Watson wrote:
Remember you can run SQL server on a non-server Windows installation if you have the developer edition
I dont have it, thats the problem. So, I prefer to go for the Server 2000 as you said... may be 2003 some days later (its not right time for me. I would experiment with the 2003 with some one else PC in the office, and then give it a try to my PC )
Thanks.
I dont know how this will help the CP people - I got 500.100 internal server error when I was trying to reply your message. I got that over only after 3 try.
I was born intelligent Education ruined me!.
|
|
|
|
|
If it's just for your development machine, take this route ...
Download the MSDE 2000 SQL Desktop engine from Microsoft's site for free MSDE 2000[^]
Following that, you can then download a new GUI front-end, if you feel the need for such things, like this one MSDEGUI[^] that was developed by Christian Graus here at CP.
D.
|
|
|
|
|
Douglas Troy wrote:
Download the MSDE 2000 SQL Desktop engine
Yes, thats a better idea. Thanks a lot.
Douglas Troy wrote:
Following that, you can then download a new GUI front-end, if you feel the need for such things, like this one MSDEGUI[^] that was developed by Christian Graus here at CP.
I use the 1clickfreedb - a utility - i guess again posted in CP.
I would give a try with the utility you had specified, and try to grasp something out of it...
I was born intelligent Education ruined me!.
|
|
|
|
|
My superiors have recently asked me a question regarding the .NET framework, raising concerns about installing it on client machines running Windows 98, NT, Win2K machines. They want to know how we, as a company, can go about testing said framework for compatibility issues. They wanted assurances that installing the framework on these machines, wouldn't disrupt or cause other applications, not using the .NET framework, to fail, or for Windows itself to fail.
Since I obviously cannot answer these questions, despite having super mind reading powers and the ability to see into the future , I thought I'd ask the great CP community to share your experience(s).
Any of you run into any "real" problems installing the framework? Has the framework itself caused any PC to just STOP working? If so, did you figure out why? Any issues with other, non .NET, applications?
I'm going to take the information provided and build some kind of an "FAQ" or Trouble shooting guide, so real problems and solutions would be great; and I'll gladly share that combined information with anyone wanting it.
Thank you,
D.
|
|
|
|
|
I had no problems after installing .NET with Framework on XP system. I have .NET and Visual 6 both are working sepatately not causing any troubles.
One thing you can call "trouble makeing" when running VC6 applications under .NET is use of some "old" functions. You'll get assert for example calling IsDigit with char less than 0 (some national signs). There was no such an assert in VC6.
Mickey
|
|
|
|
|
The .NET Framework is a relatively self-contained system. Upon installation, it modifies Windows' executable loader to recognize .NET executables, sets up the Global Assembly Cache as a part of the OS, and adds & modifies some IIS stuff (if present).
Long story short - I've never seen a .NET installation break a Windows box. It just doesn't modify that much stuff that other programs already depend upon.
--
Russell Morris
"So, broccoli, mother says you're good for me... but I'm afraid I'm no good for you!" - Stewy
|
|
|
|
|
I set DataSource for ListBox in my WindowForm by calling set_DataSource and everything is ok. Then I add some data to my data source table and want list box to refresh it's data but nothing works. When I call Hide, then Show methods of ListBox it works but that's very stupid method.
I'm quite new to .NET Framework classes and used to do this in MFC.
Mickey
|
|
|
|
|
Have you tried:
ControlName.Invalidate(); or ControlName.Refresh(); after you've added, changed your DataSource?
not sure this would fix your issue, but it's thought.
D.
|
|
|
|
|
I forgot to write it, but the point is invalidation doesn't work. That was my first idea, but even invalidating dialog doesn't work. I think it has something in common with the method of filling the list. Maybe DataSource method isn't designed for refreshing (would be stupid)?
Mickey
|
|
|
|
|
In a WinForms project, the Application.Run method can receive a Form parameter which becomes the main form of the application. According to the documentation, an ApplicationContext is automatically created.
My question is, is it possible to get a reference to the MainForm of the application or the ApplicaitonContext that is automatically created?
Thanks,
Dan...
|
|
|
|
|
I'm not sure I understand exactly what you want to do, but the default Main() code looks like:
[STAThread]
static void Main()
{
Form1 form = new Form1();
Application.Run(form);
}
So the reference exists at that point. Obviously from within Form1, you have a reference with "this". The main questions would be - (1) where do you want to reference it? and (2) what specifically do you want to do with it?
|
|
|
|
|
Well, I am trying to access the MainForm of the application from another form. So, I just decided to pass the MainForm as a parameter in a method of the other form.
Thanks,
Dan...
|
|
|
|
|
Hi,
after some setup's i have assemblies registered in my gac which i cannot remove. If i try to remove them i get a error messsage. How to get rid of assemblies in the gac which are no longer on the system, only the gac entry exists?
.:[Greetz from Jerry Maguire]:.
|
|
|
|
|
What kind of error message do you get? How are you trying to remove them? Are you using the gacutil.exe tool?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Hi,
Are you getting an error about an assembly in use when you run gacutil /u [assembly]?
I've had the same problem, and I found the answer on a forum somewhere. Every time I used gacutil /u I was told the assembly was in use, even if I had only just added it...
Sounds crazy, but apparently installing microsoft messenger 6 is what breaks this.
Check if you have a value in the default value in your registry under:
in HKLM\SOFTWARE\Classes\Installer\Assemblies\Global
Delete the data for the default value of this key, and you should be set.
|
|
|
|
|
Hi,
How can I add items in a ListBox ?
Regards,
Matthieu
|
|
|
|
|
|
The second method is set_DataSource but I have some problems with refreshing it's content during work (thread above)
Mickey
|
|
|
|