|
My subject pretty much sums it up...how do you do it? How can you read and write to an MS Access table without using a DataSet object in your C# program. I have my reasons for not wanting to use one, and I would be happy to give them if anyone wants to know. But I really would like to know how to do this, if it is possible. Thanks.
|
|
|
|
|
WhatupE wrote:
I have my reasons for not wanting to use one, and I would be happy to give them if anyone wants to know. But I really would like to know how to do this, if it is possible.
Why exactly?
-Nick Parker
|
|
|
|
|
um, alright. because a DataSet kills your memory. If you have 7000+ records, possibly with pictures, there is no way a normal system can hold it. now, can anyone tell me how i can read/write to a MS database w/o using a DataSet. Thanks.
|
|
|
|
|
WhatupE wrote:
um, alright. because a DataSet kills your memory.
Not exactly.
WhatupE wrote:
If you have 7000+ records, possibly with pictures, there is no way a normal system can hold it.
I think you might want to consider refactoring your solution.
-Nick Parker
|
|
|
|
|
Look into Command and DataReader. It is a forward only reader. You can use standard SQL staements to update records via the Command.
Rocky Moore <><
|
|
|
|
|
I create a script to upload data into local server from other remote server.
Follow is my step.
1) step ,I link server
USE master
GO
EXEC sp_addlinkedserver
'MyOtherServer',
'',
'SQLOLEDB',
NULL,
'cebas',
'DRIVER={SQL Server};SERVER=MyOtherServer;UID=cdc;PWD=cdc;'
GO
2)step I get data from MyTable
select * from [MyOtherServer].[MyDatabase]..MyTable
Result:
Server Msg disp "Login failed for user 'sa' when I exec .
|
|
|
|
|
You might take a look at sp_addlinkedsrvlogin.
Rocky Moore <><
|
|
|
|
|
hi there!,
how can i change the focus so the input goes just to the panel.
for example in my program when i press enter or space one of the buttons on the toolbar works "cose in my program i use left and right keys and then enter!"
my input goes to mainform and not to panel wich on mainform
is there anyway just to disable input to toolBar.
i think its hard to understand my question
good luck.
|
|
|
|
|
i couldnt follow most of your question, but maybe this will help..
you should set focus to the control (textbox, etc.) that you want to have the initial focus..
create an OnLoad() handler for your mainform, and after the panel is displayed call:
this.myPanel.Focus();
or in your OnLoad() of the panel call
this.myTextBox.Focus();
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
MSDN help says you can use a UNC path for any methods
that accept a path, and I'm wondering if I can also
substitute an IP address for the UNC....???
Example:
Using System.IO.File.Move()
File.Move("\\\\MyServer\\share\\dir\\myfile.txt",
"\\\\YourServer\\share\\dir\\myfile.txt");
Should I also be able to use IP address like this?:
File.Move("http://192.168.1.1\\share\\dir\\myfile.txt",
"http://192.166.1.3\\share\\dir\\myfile.txt");
thanks for your input...
vince
|
|
|
|
|
On the network you shouldn't have to include the "http://" portion, but you can use the IP address of the server, usually.
-Nick Parker
|
|
|
|
|
thanks for the reply....
so I could do something like:
"\\\\192.168.1.1\\myshare\\dir\file.txt" ???
thanks for your input..
|
|
|
|
|
vlusardi wrote:
"\\\\192.168.1.1\\myshare\\dir\file.txt" ???
Yes, but you would only use two backwards slashes before the I.P. Address.
-Nick Parker
|
|
|
|
|
Nick,
thanks for the clarification... I'll be trying it out soon...
|
|
|
|
|
Ummm... if this is c++ or c# (non-literal string so things need to be escaped) you would need the double slashes, hence four slashes at the beginning...
Sorry, I being nit-picky....
-Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
Well, with C# you could use a verbatim string with an @ in front of it and you would only need two backwards slashes.
-Nick Parker
|
|
|
|
|
How can I insert a row into a datagrid control that is bounded to a datatable? For clarification, by insert, I mean creating an empty row in the middle of the displayed filled-up rows. Having searched all the websites and entire MDSN library, I would greatly appreciate any tips on this. Thanks!
|
|
|
|
|
Set a handler for the ItemCreated or ItemDataBound and insert the row you want.
|
|
|
|
|
Ok I have a simple function used to resize and create thumbnails. I build the file in vs.net, CreateThumb.cs. Now how do I go about calling that function from an asp page?
I suppose I need to register the DLL etc...so I can call the function in my asp page? Need the syntax for that.
Call CreateThumb(param)
Please help!
Thanks,
Jordan
|
|
|
|
|
jrmcdona wrote:
I suppose I need to register the DLL etc...so I can call the function in my asp page? Need the syntax for that.
It doesn't really work like that. To get a .NET assembly .dll to load in a regular ASP page is a little difficult (though it can be done, check my article Creating a RCW for COM enabled non .NET applications[^] ). Otherwise if you are creating an ASP.NET page, you can simply create an instance of your class and start using it.
-Nick Parker
|
|
|
|
|
Also, the assembly either has to be dropped into the ASP.NET Web Application's private path (usually bin) or installed into the GAC (use gacutil -i <assemblyName> or drag it into \windows\assembly).
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
Hello Gurus,
Can anyone give me some good sources on this topic?
Thanks so much
Khang Nguyen
|
|
|
|
|
Use DataGridTableStyles . You can easily do this during design-time with the DataGrid.TableStyles property. You can have multiple table styles, each bound to a different DataMember name (usually tables of a DataSet or something). Within each of these table styles, you specify each column and bind them to a DataColumn name (for each row of the table to which the style is bound). Programmatically, the same procedure is used. Lets say you want the last column of the first table style to be 100 pixels:
int count = dataGrid1.TableStyles[0].GridColumnStyles.Count;
dataGrid1.TableStyles[0].GridColumnStyles[count - 1].Width = 100;
This is for a System.Windows.Forms.DataGrid and can use other data sources other than a DataSet since table styles themselves don't have to bind to any data member and you can just specify the grid columns bound to certain columns / properties in whatever data source you use.
Now, if this is a System.Web.UI.WebControls.DataGrid , you have to use template styles.
In either case, try it in the visual designer, look at the code produced in the source file, and read the docs so you understand exactly what you're reading. It's not that hard and you can customize a lot without overriding anything.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
Thank you so much, Health. Your tip is very helpful!
|
|
|
|
|
I have an Extension DLL create from MFC which consists of so many exported classes and would like to be able to use them on my c# project. I know since this is not a pure COM Object and therefore i can't use tlbimp.exe to create Runtime callable Wrapper class for it. As I was reading about Platform Invocation Service (PInvoke) and my question is,
can i export classes from my dll through PInvoke? Or just functions that can be imported from PInvoke? Any Suggestions will be much appreciated.
|
|
|
|