|
I guess, that should work.
Try accessing through Oledb.
Thanks
|
|
|
|
|
Please, could you describe in steps... How to connect to the file... What provider should i use when i create new OleDbConnection("????Datasource=C:\asdf.dbf");
|
|
|
|
|
Well i tried next :
OdbcConnection connection = new OdbcConnection("Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=E:\\Visual Studio Projects\\GeoObjects;");<br />
connection.Open();<br />
OdbcDataAdapter adapter = new OdbcDataAdapter("SELECT * FROM uub_location_point",connection);<br />
DataSet dataset = new DataSet();<br />
adapter.Fill(dataset);<br />
dataGrid1.SetDataBinding(dataset,"street_route_line_polyline");
And i tried using OleDb, but i had an error, and it says that it cant find object street_route_line_polyline... Maybe i do something wrong?
|
|
|
|
|
Is the Dbase file located on the same system on which the application is located?
Are u trying to connect to a shape file/info file?
Try connecting to a normal dbf in ur own system....
|
|
|
|
|
Yes it locats on the same system, and i try to connect to my *.dbf file... But without success...
|
|
|
|
|
Is it possible to work with *.dbf files as with database, using SQL???
And how to do it in steps - if it is possible...
And where to find DBF file format? And if someone knows what encoding does it use?
|
|
|
|
|
Hi all,
I use a treeview and want to select a node programmatically.
I have identifyed a node by its tag like
if (treeview1.nodes[i].nodes[j].tag == 1234)
select this node; // - but how
I want to select this node, by expanding the branche and select the node;
Thank's for your help
regards
Frank
|
|
|
|
|
treeview1.nodes[i].nodes[j].Selected = true;
I am not sure, but it should be something like that.
WM.
What about weapons of mass-construction?
|
|
|
|
|
Just assign treeView1.SelectedNode to the node you want to be selected. To expand nodes under the selected node, you can use the Expand method on the node object. Something like
if (treeview1.nodes[i].nodes[j].tag == 1234)
{
treeView1.SelectedNode = treeview1.nodes[i].nodes[j];
treeView1.SelectedNode.Expand();
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Guys,
I was able to import my excell file to my datagrid using dataset. The only problem is that the DATES "01/22/2005" in one of the colums in excell when read from dataset becomes numeric, it was converted to number with a value of 36753. When I checked the Excell format for that paricular cell it has a DATE Category.
Any one of encounter the same scenario? Any Ideas?
Thank you in advance.
Dabuskol
|
|
|
|
|
I need to convert the picture on the panel to bytes.
I did that but it works only for the backgroungimage of a panel.
in my program I use 3ds max to draw on the panel
I need to convert the picture on the panel to bytes
this is the function I use to get the bytes of the backgroungimage of the panel
private void fun()
{
pna1.BackgroundImage.Save("m"); //m is the name of the file
bm = new Bitmap("m");
//the size of the panel is 240*160
byte [,] matrix= new byte [240,160];
byte red=0, green=0, blue=0;
byte [] test=new byte [1];
for (int y=0; y < 160; y++)
{
for (int x =0; x < 240; x++)
{
Color u=bm.GetPixel (x ,y);
//I need only one byte represent each pixel
blue = (byte)(u.B/64*64);
green = (byte)(u.G/32*8);
red =(byte)(u.R/32);
matrix[x,y]=(byte)(red + green + blue);
}
}
}
|
|
|
|
|
Hello,
i want to make an application for a touchscreen. On the first form
you'll have to enter a number and then you'll have to hop to the
next form and close the first one. How can i do this in a good way ?
A sort of wizard is what i want, can anyone give me a hint how to
realize this ?
thanks
with kind regards
Joris
|
|
|
|
|
You'll need a controller class popping up the Form s one by one.
This class could hold a collection of Form s to show and each form could inherit from a common base class that's responsible for showing/handling the controls to switch to the next (and perhaps previous) Form .
In your controller class itself it's just a matter of several ShowDialog s.
Regards,
mav
|
|
|
|
|
I have a chat application that uses UdpClient. Ok.. now I want to send messages to the clients who are indirectly connected to the internet.. like a shared connection over LAN. What should I add besides the regular steps?
Regards
|
|
|
|
|
Hello All,
I have a data grid on my form and a Delete button adjacent to the grid. To perform Delete action I want to select the row but I am not able to do this.
How can I select a row on Mouse Click?
Please somebody help me.
Thanks in advance
Looney
|
|
|
|
|
add to datagrid mouse click event handler
dataGrid.Select(dataGrid.CurrentCell.RowNumber);
|
|
|
|
|
|
when i press enter i want to select the whole row in datagrid so i added
....
this.dataGrid1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.DataGrid1KeyPress);
....
void DataGrid1KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Enter) dataGrid1.Select(dataGrid1.CurrentCell.RowNumber);
}
..and i overrided onkeypress in mydatagrid with
protected override void OnKeyPress(KeyPressEventArgs e)
{
base.OnKeyPress (e);
}
but not working...what is missing??
|
|
|
|
|
Is there any ways to read directly and rapidly from a stream to an unmanaged buffer ( IntPtr or byte* ) without having to do a convertion from the byte[] to the IntPtr through Marshal.Copy method ?
More clearly, I want to avoid this Marshal.Copy :
byte[] b = new byte[1024];<br />
int size = theStream.Read(b, 0, 1024);<br />
IntPtr bufferPtr = Marshal.AllocHGlobal(size);<br />
Marshal.Copy(b, 0, bufferPtr, size);
Apparently there is a UnmanagedMemoryStream class coming along with winFx doing the job, but I'm looking for something usable with the framework 1.1
Thanks a lot,
Julien.
|
|
|
|
|
Here is an example of how I load a memory font from resources:
PrivateFontCollection col = new PrivateFontCollection();<br />
Stream fontStream = GetType().Assembly.GetManifestResourceStream("somefont.ttf");<br />
<br />
byte[] fontdata = new byte[fontStream.Length];<br />
fontStream.Read(fontdata,0,(int)fontStream.Length);<br />
fontStream.Close();<br />
<br />
GCHandle gc = GCHandle.Alloc(fontdata, GCHandleType.Pinned);<br />
<br />
col.AddMemoryFont(gc.AddrOfPinnedObject(),fontdata.Length);<br />
gc.Free();
xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
|
|
|
|
|
That's interesting. Do you know what is actually GCHandle.AddrOfPinnedObject doing behind ? Because I'm not sure C# arrays are contiguous like C/C++ arrays are. And I profit to ask you; have you compared both methods efficiency ( GCHandle / standard Marshal.Copy ) ?
Thanks for the hint anyway
Julien
|
|
|
|
|
|
Hello,
I have written C# dlls, but not executable wrappers. I would like to wrap an executable and make it a *service*. Can anyone recommend an article or approach?
Many thanks,
dotBomb
|
|
|
|
|
I want to free up the network while the user is logged in to the machine.
Basically I will be running azurues on a machine that my family uses. They have all different logins to the machine. Mum, Dad, Sister, etc.
When I have azureus running under my account they can't browse the web becuase I am chewing up all the network. User fast switching allows my account to continue downloading through azureus ... while someone else logs in to browse the web and check their emails etc
I don't want to give them access to my account to pause/stop azurues.
I can build a small app that can talk azurues by using azurus xml over HTTP plugin. This is not a problem. But I don't want to have to have them manually stop/start azurues with this app as they may forget to restart it.
I wanted to make the whole process automated. So I was going to write a NT service that will pause azurues when a user logs in and resume download when they log off.
But I am not sure where to start looking to get the logon and logoff event.
It would be good if I could get the user id that is logging on and off So that I can select which accounts will pause azureus and which will allow it to continue running (ie my logon account).
|
|
|
|
|
Hello everyone!
This is my first post here!
OK, I made some kind of music player that plays the music in a different thread... When the user clicks the "Stop" button, the thread stops, but then I can't restart the thread when the user clicks "Play" because I get a ThreadAbortException! What can I do? Thank you very much!
Darth_Sulfur (Sulfurik)
http://www.SulfurSoft.tk
ftp://tsfc.homeftp.net
hotline://tsfc.ath.cx
|
|
|
|