|
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? And what version of *.dbf files ESRI uses in their shape file format?
|
|
|
|
|
You can create a Dbf file in Visual Foxpro Editor.
And I am not sure which version of .dbf files ESRI uses for its Shape File format, but I think you will get the required information from the Esri Site.
And wat do you mean by "Is it possible to work with *.dbf files as with database, using SQL???"
Thanks
|
|
|
|
|
I mean what classes shoud i use to work with *.dbf file using SQL??? Should i insert new DNS in ODBC?
|
|
|
|
|
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
|
|
|
|
|