|
Hi Mika,
I have already done what you described. But I think a more comprehensive document about how to add SOAP header and a sample would be greater! Any referral documents or forums/maillist to ask the question?
regards,
George
|
|
|
|
|
|
Thanks Mika!
I like the document you referred.
Any more comprehensive tutorials or documents describing the SOAP header related fields in WSDL?
regards,
George
|
|
|
|
|
You're welcome.
Sorry to say but I've got nothing else in mind since I usually let VS generate the necessary definitions for WSDL. Hopefully google will help you. Especially W3C related sites...
Mika
The need to optimize rises from a bad design
|
|
|
|
|
Thanks Mika,
Let me know when you have any more readable materials on this topic in the future. I am reaing w3 sites now, but not quite readable and boring.
regards,
George
|
|
|
|
|
hi,
this is exactly my first program, i will be using C#. The device i am using is a usb connected PC digital TV receiver this receiver software actually have a function which measure the signal strength, BER and these data are save into an log file (thus it real time measurement data) once i start the device (start watch TV).
I am suppose to use C# to get the real time measurement and convert it into graphic (line chart).
I have try to get the data for the log file and display it in the textbox using the following code
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Testing_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
StreamReader objstream = new StreamReader("c:\\measurement.log");
textBox1.Text = objstream.ReadToEnd();
}
but this is the error i got : IOExpection was unhandled the file been use by another program.
I also try another method which is directly from the usb port which the device is connected to but i am unable to start working on it coding. i had been looking into example of usb_hib and ICSHARPUSBlib but i was unable to get anything out.
Thus please help me, if i am in the right direction (get the data from usb directly?) or do you have any better item on how i should get this done, any code to refer to.
thank so much
|
|
|
|
|
Re-posting your question is considered rude!
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
hi Harvey Saayman
i repost my question after listening to your advice on reading the following forum (How to use the code project forums[^]), thus i repost my question with the title other could understand more, i am sorry i didnt know this action consider rude. I am just hoping I could be able to get help.
yefeng_law
|
|
|
|
|
yes the subject is better this time, but you can edit the original post, you dont have to make a new one
yefeng_law wrote: I am just hoping I could be able to get help.
and will get help if someone here is able to help you, your new so its fine... but dont repost a question just to get it back on the first page etc.
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Thank i understand what you mean.
Regard
yefeng_law
|
|
|
|
|
cool
so has there been any progress with your program?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Sad to say no progress at all. I think i would have to get the data from the usb port but i have problem programming even after looking at the code from some example to be correct i don't even know how to start with it. I think i will be dead drop.
Anyway thank,would be nice if you have any recommendation for me.
|
|
|
|
|
I think the reason for the answer is obvious : "c:\\measurement.log" is being used by another program.
Instead of reading the log file and displaying the results, you should directly get data from the usb device.
yefeng_law wrote: I also try another method which is directly from the usb port which the device is connected to but i am unable to start working on it coding
Why? have a look at the examples and if still can not solve contact the manufacturer of the device for library. Thats the only way I think.
|
|
|
|
|
in my application i have a xsd file and i get the serialied object in an xmk file. i want to deserialize the xml file and get the object. how can i create the class from the xsd to create the object.
|
|
|
|
|
|
I want to be able to put all the info and to connect and retrieve data into an app. In VB.net I used to make a seperate vb module that I would access from the main form like this
From a button click
getData()
and in the module the function is called getData()
this all worked great in VB and it kept my main form and all the "data modules" seperate. They were easy to maintain and troublshoot.
How would I do this with c#.dot? I have tried making a seperate class file but I cant figure out how to call it. The above procedure does not work the same as it did in VB
tia
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Could you post the code you're trying to use?
Intelligence is almost useless for those who have nothing else!
Phone: +55 51 81252.425
Email: caiokf@gmail.com
|
|
|
|
|
sure. This works fine from my form
private void connectToolStripMenuItem_Click(object sender, EventArgs e)
{
// connect to the database
// define connection string
strConn = "Data Source=localhost;IntegratedSSPI;
"+ "Initial Catalog=myDB";
strSQL = "SELECT * FROM myTable";
SqlDataAdapter da = new SqlDataAdapter();
cn = new SqlConnection(strConn); // connect to SQL
//-------- Define a new Dataset ----------
DataSet ds = new DataSet();
//-------- Define a new DataAdapter ----------
da = new SqlDataAdapter(strSQL, cn);// connect the data adapter
//-------- fill the DataAdapter ----------
da.Fill(ds, "dsPoints");
//-------- Assign the DataSet to the DataGrid ----------
dgv1.DataSource = ds;
dgv1.DataMember = "dsPoints";
}
I would like to have the button click on the form just call this code as a module say like this
private void connectToolStripMenuItem_Click(object sender, EventArgs e)
{
getData()
}
The coding of C# I'm catching on to but the mechanics of how the pieces connect together (outside of the form)are what has me hosed up.
I would like to be modulerized...can't really find good reference on concepts plenty of content though.
any help or suggestions are greatly appreciated.
TIA
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Hi,
To do that: your other class will need to have a "static" method (do not need a instance - google it if needed), and problably you would have to pass the grid to the function.
Anyway, I was think that's is not the best solution, I would like to give some tips:
- Do not use hard-coded connection string. Put the connection string in app.config and reference from there.
- Do not modularize so much as to make your module dependable of your form.
- Maybe try something like that, just a quick implementation, and easy to use:
public class DatabaseAccess
{
public static DataTable OpenQuery(string query)
{
OleDbCommand cmd;
OleDbConnection cnn;
OleDbDataAdapter da;
DataSet ds;
DataTable table;
try
{
cnn = new OleDbConnection(YOUR_CONNECTION_STRING);
cmd = new OleDbCommand(query, cnn);
cmd.CommandType = CommandType.Text;
cnn.Open();
da = new OleDbDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds);
table = ds.Tables[0];
cnn.Close();
cnn.Dispose();
}
catch (Exception e)
{
throw new Exception(e.Message);
}
return table;
}
}
And use it like:
grid1.DataSource = DatabaseAccess.OpenQuery("SELECT ... FROM...");
Regards
Intelligence is almost useless for those who have nothing else!
Email: caiokf@gmail.com
|
|
|
|
|
Sir;
Thank you very much. I can see from this example exactly how to acomplish what I wanted. Thanks also for the tips...and for reminding me that I need to clean up after myself i.e.
cnn.Dispose();
You have been most helpful!!
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Glad to help
Regards
Intelligence is almost useless for those who have nothing else!
Email: caiokf@gmail.com
|
|
|
|
|
Rafone wrote: Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
I like that
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
I have created a custom datagridviewcell that is to take a double value
from the database and parse it into a string that displays a date in a
certain format. I have the conversion process working.
The trouble that I am having is getting and pushing the double value
to/from the database. Of course the FormattedValue that is generally
pushed to the database is the string but I want the double that generated
the string.
Any ideas on how I can change the property that is bound to the database
instead of FormattedValue?
Brian
|
|
|
|
|
I figured it out.
What I did was override the cell's Paint method and paint the string I
wanted displayed in the cell leaving the double value as the cells
formattedValue. I then overrode the cell's ParseFormattedValue method
to take the string that the user input, convert it to the appropriate
double representation and make it the formattedValue of the cell. This
displayed the correct value to the user while maintaining the correct
double value as the cells value for pushing back to the database.
I also had to create a new DataGrodViewEditControl to display the
correct string to the user when editing.
If anyone has a similar problem and wants a look at the code, email
me at liedtke@frii.com.
Brian
|
|
|
|
|
I'm trying to make a username grabber from a game's highscores page.
http://hiscore.runescape.com/hiscores.ws[^]
The name I want to grab will be in the center where it says "KingDuffy 1"
How would I go about doing this?
Thanks,
Buckley.
|
|
|
|