|
I've tried, still the same, and with Int16 also
thanks for the effort though
No hurries, no worries.
|
|
|
|
|
Hi, I'm trying to read a .DBF (Database 4) file with ADO.NET and CodeBase for .NET. Everything works for all the fields, except the password field which is encrypted. Below you will find the code. The data is stored properly on the database, but when I read it back I'm getting different results. On the database is 0xAA091B3BFA. Reading it back in I can see the 0xAA and the 0xFA at the end have been changed to something else. Is there a way to read the data and say AS IS? Or could this be a bug with CodeBase?
strUserID = efUserID.Text;<br />
strUserID = strUserID.ToUpper( );<br />
<br />
strSelect = "Select * from USERIDS where ID = " +<br />
"'" + strUserID + "'";<br />
<br />
odbcDataAdapter = new OdbcDataAdapter(strSelect, odbcConnection);<br />
odbcCommandBuilder = new OdbcCommandBuilder(odbcDataAdapter);<br />
odbcDataAdapter.Fill(dataSet, "User");<br />
#endregion<br />
<br />
#region Populate the local variables with the table values<br />
DataTable dataTable = dataSet.Tables[0];<br />
<br />
foreach (DataRow dataRow in dataTable.Rows)<br />
{<br />
strUserID1 = (string) dataRow["ID"];<br />
strName = (string) dataRow["NAME"];<br />
strPassword = (string) dataRow["PASSWORD"];<br />
strExtension = (string) dataRow["EXTENSION"];<br />
} <br />
Thank you,
Glenn
|
|
|
|
|
Hi,
I'm realtively new to regex expressions and I'm trying to make the best out of documentation, however I don't know how to go on about this one.
I want to match crc checksum enclosed in square brackets. The best I can come up with based on documentation and expresso examples is this:
(?<=(?:\[))[a-fA-F0-9]{8}(?=(?:\]))(?x)
The problem is that I want to make it a little more foolproof. Is it possible to check if the expression inside the square brackets has at least two numbers AND at least two characters AND has a total length of 8? Is it possible at all?
PS a little side question, not related to the main one. MSDN says that [0-9]^4 will match any 4 digit sequences, however when I try it out in expresso it doesn't work... In fact it doesn't appear to work at all (except as a part of negation in a set).
PPS actually I have another side question. I also match quoted expressions. Documentation says :q should match it, which is equivalent to (("[^"]*")|('[^']*')). However neither :q nor \q work for me, however if I put it in explicit form (("[^"]*")|('[^']*')) it does. What am I doing wrong?
Thanks, JJR
-- modified at 9:29 Tuesday 21st March, 2006
|
|
|
|
|
Hello,
I have a dataset, that has only one table. I load the dataset using SQLDataAdapter. I add a single row to the table. Here is a dilema:
How do I push the changes to the server, and then reload the datatable with the updated source. The thing is, I use
this.adapter.Update(dataTable);
now, I want to reload only the new row that I have added and not the whole table. So is there a way of getting back only the new row from a server, and not clear the whole table and then Fill the table again using the adapter. Any ideas?
Thank you.
|
|
|
|
|
Hi friends,
Am on the deveelopment of a private chat web-application module. I need to know the intiative i have taken will head to the right point. i have started doing it with Socket Programming and TCP. Is this the right way to do or is there a better method.
Requirement goes like this.
A link will be displayed on the user profile page that "I am online". On click of this a window should pop in both the user's computers and they should be able to do a private chat.
Am at a stage where I can connect two Systems on LAN and exchange messages through socket programming via Console application. Also please let me know how to open a new widow on a different computer and display the sent messages in it. Do i need to use Remoting concept to do this.
Please advice.. Any sugestion or advice would be appreciated..
Thanks in Advance,
shabeer
|
|
|
|
|
hi shabeer,
If your application is only for LAN then TCP sockets is somethig that is genrally used. If you need your application to be used from Internet then this TCP socket will not work if you computer is behind a proxy. So It all depends what is the scope of your project.
Also its better if you use synchronous communication for sosckets as you handle of all threads and can manage threading rather that using system threads when by using asynhronous communication.
In short- TCP sockets will not work behind proxy.
you need to have all you system with external IP if using tcp sockets.
Regards,
Anil
|
|
|
|
|
hi anil,
Thanx a lot for your kind valuable information. I infer what u have said.. This is an internet application (an australian datting web-site).
But could you tell me a method for making this possible. Am ready to work any hard and am in very much need to get this done..
1. how do i communicate two different computers on internet (if required communication can be routed through a server in between)..
2. how do i open a new window on a remote computer to display the message.
i just need a start.. once i get to know which concept would help me, i believe i can go ahead..
-shabeer
|
|
|
|
|
Check these links hope this helps
http://msdn.microsoft.com/msdnmag/issues/01/02/netpeers/
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/d1e56ec3348d2c28/c28944653750b9ea?lnk=st&q=c%23+chat+behind+proxy&rnum=1&hl=en#c28944653750b9ea
Plese let me know if it helps.
If possible I will make a sample and send you this weekend.
|
|
|
|
|
i am new to tapi, i've try to use the sample to an outgoing call. when
the phone rang. the connection state show me that CS_CONNECT. but
actually, i still not took up the hand set to receive the call. how can
i check the status of the connection state whether the remote end has
received the call or not? once the receiver took up the phone i want to
play an audio . Thanks so much.
|
|
|
|
|
A lot depends on the hardware being used. Most voice modems use the connection state once they've "connected" without the phone actually being picked up.
Proper telephone PABX's use other states before sending the "connected" message.
I suggest you use TapiBrowser to monitor the events being fired and see if your hardware is firing any other event.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
I have 2 form in my application 'Form1' & 'Form2'
'Form1' is main form how i can show 'Form2' from 'Form1'?
with this code i cant do this job.
Form2.ActiveForm.Show();
|
|
|
|
|
Hi
Create an instance of Form2:
Form2 form2 = new Form2(); Then, use either:
form2.Show(); or
form2.ShowDialog();
----------------------------
Be excellent to each other
EasiReports[^] My free reporting component for WinForms.
|
|
|
|
|
Using some event to call it up (command button, etc.) or just opening in your constructor of form one:
System.Windows.Forms.Form form2 = New myNamspace.Form2;
Form2.show();
Brettski
|
|
|
|
|
Seeing as this is a C# forum, that code wont compile like it will in VB.NET
I am guilty of the other way round, I always manage to post C# in the VB forum - and it always gets pointed out to me.
|
|
|
|
|
It wont? Please explain? It's what I use and I don't use vb.net.
Thank you,
Brett
|
|
|
|
|
Form2 frm = new Form2();
frm.Parent = this;
frm.show()
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
I am setting Conditional BackColor property of UltriWinGrid ButtonColumn with this code:
private
void gridLookup_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
if(UtilClass.IsNumeric(e.Row.Cells["BuildingId"].Value.ToString()))
{
e.Row.CellAppearance.BackColor = Color.PeachPuff;
e.Row.Cells[0].Band.Layout.Override.CellButtonAppearance.BackColor = Color.PeachPuff;
}
else
{
e.Row.CellAppearance.BackColor = Color.White;
e.Row.Cells[0].Band.Layout.Override.CellButtonAppearance.BackColor = Color.White;
}
}
now this code is working fine at first time but when user perform horizontal scrolling on this grid the button column disappear once and when user again reverse scrolls the column appears without back color formatting, how can I make assigned backcolor stable on scrolling.
|
|
|
|
|
Thats nice. Now why dont you ask the authors of this control?
|
|
|
|
|
This question belongs on the Infragistics user forum, not a general programming forum.
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
Would anyone happen to know how to use the start.dll to open files? what parameters it takes and what the basic code is needed to get it working? basically i want to be able to pass any file to the start.dll and it will then open the file in the right application, just like normally happens when you open a file in windows explorer.
|
|
|
|
|
You don't need a DLL to do that...
Simply use:
System.Diagnostics.Process.Start("filename");
that will open the specified file in the asociated program.
--------------------------------------------------------
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi all,
I would like to store a string in a file using Rijdael encrypt method , and I'm looking for a way to store the iv (Initialization Vector) inside the encrypted file as well, in this way the user doesn't have to remember both the key and the iv.
My solution is to save the iv as plain text at the beginning of the file followed by the encrypted text.
//declaration used by both write and read
BinaryFormatter bformat = new BinaryFormatter();
Rijndael rij = Rijndael.Create();rij.Key = key;rij.IV = iv;
//write to file
Stream stream = File.Open(label3.Text, FileMode.Create);
CryptoStream crypt = new CryptoStream(stream, rij.CreateEncryptor(), CryptoStreamMode.Write);
bformat.Serialize(stream, iv);
bformat.Serialize(crypt, "hello");
stream.Close();
crypt.Close();
//read from file
Stream stream = File.Open(label3.Text, FileMode.Open);
CryptoStream crypt = new CryptoStream(stream, rij.CreateDecryptor(), CryptoStreamMode.Read);
//set the iv
rij.IV = (byte[])bformat.Deserialize(stream);
//read the encypted data
string test = (string)bformat.Deserialize(crypt);
stream.Close();
crypt.Close();
My problem is : (string)bformat.Deserialize(crypt); throw an exception : "Binary stream '190' does not contain a valid BinaryHeader".
What's the matter?
The problem is crypt.position is different from stream.position ?
Do you know any other way to save the iv in an encrypted file?
Thank Francy
|
|
|
|
|
I guess that something is written to the stream when you create the CryptoStream. Try to read and write the IV before you create the CryptoStream.
---
b { font-weight: normal; }
|
|
|
|
|
HI
HOw to change the language of the messagebox button
Mohamad A. Flefel
C#.net Developer
|
|
|
|
|
Do extensive research on localization. Plan for about a 2-3 week project to implement it into a working project.
|
|
|
|