|
dear all,
i have question,about my code have problem....
how do I know if this dbf file or not, with a different extension, but it is a dbf file
example:
"12345.bck"
file above is actually a dbf file, which just changed its extention.
i am develop using C#....
please all,help me
|
|
|
|
|
I imagine if you try to connect to it as if it was a dbf file, you'd find out soon enough. Beyond that, you could look at the file format to see if there's some marker bytes you could read and examine.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i am sory christian,
I do not find your suggestion on the blog..
clearer please...
|
|
|
|
|
I don't mention it on my blog, because it's not a bug in Microsoft. It's just common sense. I can't make it any clearer.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
As CG suggested connect to it and see if it fails. You can get connection information here[^]
|
|
|
|
|
|
Hi, you can check the type of the file
use:
FileStream fs = new FileStream("Your file path", FileAccess.ReadWrite, FileMode.OpenOrCreate);
StreamReader sr = new StreamReader(fs, Encoding.Default);
sr.ReadToEnd();
sr.Close();
fs.Close();
or File.ReadAllLines("Your file path", Encoding.Default);
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:58pm.
|
|
|
|
|
Hi,
Please can anybody tell me how to post data from a windows application to a webpage.
thanks in advance.
|
|
|
|
|
vnr wrote: how to post data from a windows application to a webpage.
Can you please explain your requirment in details ? What do you mean by Post Data ? You are looking for some thing HTTPPost or any kind of web service ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi,
Thank you for your reply .I have an application from which I need to (http post) send the date to a website every day .I will configure that application as a service and it will fetch the data from databse and send the data to a website url ,in that website page i will write the code to store the information which i got .
So i have to write the code to post the data from my service to a website page.
|
|
|
|
|
Is the webpage one you're writing, or one you hope to control ? The best way is to use a webservice.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Hi,
I am working on building a C# Winforms application which will allow me to login to a forum or site and perform certain tasks. I am stuck at the very 1st step. I cannot login to the forum. Here is what I have tried so far,
the Login button has the following code :-
try
{
Uri uri = new Uri("http://www.thinkdigit.com/forum/login.php");
string data = "vb_login_username="+userid"&vb_login_password="+password;
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
request.Method = WebRequestMethods.Http.Post;
request.ContentLength = data.Length;
request.ContentType = "application/x-www-form-urlencoded";
StreamWriter writer = new StreamWriter(request.GetRequestStream());
writer.Write(data);
writer.Close();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string tmp = reader.ReadToEnd();
response.Close();
richTextBox1.AppendText(tmp);
}
catch (Exception ex)
{
textBox3.Text = ex.ToString();
}
Thats what I scrounged up after google busting and visiting so many forum posts. Unfortunately this does not seem to log me in the forum. I am checking the HTML generated content in t my richtextbox control and there's the login fields there still. Which means it didn't login.
I checked the login page.
and these are the contents there
<form name="loginfrm" id="loginfrm" action="login.php?do=login" method="post" onsubmit="md5hash_2(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0);">
<input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="User Name" onblur="myUnTip();" onmouseout="myUnTip();" onfocus="if (this.value == 'User Name') this.value = '';myTip();" />
<input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" />
<input type="submit" class="button" value="Log in" tabindex="104" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" />
those are the relevant parts IMHO
so I am filling up the username field, filling up the password, posting to the login.php page with the data ...what am i mising out ?
Also I have another query. Is there a way to load the response , as in HttpGetResponse in a webbroswer control ? If I am login in to the forum, then it would be nice to have the logged in page loaded in my webbrowser control!!
Any Help Would be appreciated.
thanks a bunch folks for your time!!
modified on Wednesday, September 9, 2009 3:57 AM
|
|
|
|
|
Can I get some help here please ?
|
|
|
|
|
Hello All...
I am developing an application i.e. Development of a Network Management Tool
which will have tools like ping,tracert..etc
In the end I have to generate a Network diagram of the pinged nodes.
I just simply have no idea on how to generate this..
please help
|
|
|
|
|
Well, you could start by reading the guide on how to ask questions. Your question is not urgent. It won't change our lives at all if you fail in this task. You should choose a subject that reflects the task, not your lack of preparedness.
You draw a diagram by handling a paint event, and writing code to draw whatever it is you want to represent. I'd imagine I'd do it by having a base class for all objects that can be drawn and having a collection of them, which all draw themselves in the paint event of the main form. Of course, you'd still need to write code to position them properly.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
See remark from Christian, but generally you start with a design.
* What do you need to do the job? What objects? Try to divide the work in small tasks. If you don't know the correct .Net object, try MSDN.
* How do these tasks and objects fit together?
start with what you know and ask specific questions when you get stuck.
hope this helps.
|
|
|
|
|
I wish to do some event logging through a windows service.
Events can be read or written by a windows service, and simultaneously same events read or written by a winform application controlling the service.
Which is the most efficent and fastest method for this communication.
XML, eventlogs.
+ I can do some triggers on event logs so that winform application reacts immediately to reports from service, can i do this in xml?
|
|
|
|
|
faheemnadeem wrote: I can do some triggers on event logs so that winform application reacts immediately to reports from service, can i do this in xml?
You can write code that watches the XML file and when it is changed, reads and parses it. This will not be fast, you need to reparse all the data every time.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Same goes for the event logging method using eventlogs, triggers response is fairly random and has some delay, which is inherent to windows i think so.
takes 2-3 seconds on reply.
Any other faster solution!!!
|
|
|
|
|
You could try a SQL database, I guess.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You could loopback socket them...
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I am making a TCP/IP server which is running as a service. The server listens for incoming client connections acquire data from them and inserts them into a private message queue.
All goes well!!!
Now what i am stuck at, is that i am making a server control GUI based application, which does some settings of this server for installing through an INI file, starts/stop, restarts etc and display some event logs which the service is currently generating. This one side communication also goes well.
The Problem
I wish to send some arguments/ data back to the service while its (running), like if i want to forcibly disconnect some client, so i send an ip:port to the service and does that for me.
i can use custom commands, but they don't take custom arguments. So i need is a simple as possible way to pass data to a service while its running.
And can i make a custom method in a service and access it from a service controller or by any other means.
Any help would be appreciated!!!
|
|
|
|
|
hi,
from where you want to give an input to the service...
i have an idea but not fare...
You can store the IP in local file and, you can read that from the service...
or
try to create some pipes( keep the values in memory itself)
|
|
|
|
|
well i want to provide the data dynamically from a winform application.
the data would be just some stings like i mentioned, ip port, which i require to disconnect client sockets. do some white listing, black listing etc.
Please can u be specific on the procedure, as i am a beginner programmer, so any code or article reference would be helpful.
+ a thing i thought was to make entries in a xml file, and use the custom command override in service to get data from there on user request. any other suggestion would be helpful.
|
|
|
|