|
|
AFIK there is no system defined large cross cursor.
BTW, why go through all of this rather than use Cursors.Cross and Cursors.None?
only two letters away from being an asset
|
|
|
|
|
Don't delete your question, that is really rude.
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.
|
|
|
|
|
|
First, this is the wrong forum, you should use the ASP.NET forum as this question is ASP.NET, not C# in general
Second, we're not going review all of you code. Describe your problem and include the relevant bits, not everything.
only two letters away from being an asset
|
|
|
|
|
I am sorry for posting it here...I am deleting the post from here....and to my defense I would say that I thought this much code would be needed to see what I am trying to do here. Though it might seem to be a very unprofessional way to some of us.
|
|
|
|
|
Just info :
1. Do some debugging, and give us only the line, where exception/error is thrown.
2. If we see a lot of code, then we just skip it, sometimes we have no times to review all of your codes.
|
|
|
|
|
private void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack)
{
getMLNO(Specific_Query_DDL.SelectedItem.Value); //This is where I am generating all the values from the DB for the second dropdown list. And as it's getting post back so even if I click submit button then the page gets post back and the selected value for the second dropdown list gets set to the default value, which is ANY
}
}
private void getMLNO(string selectedvalue) //This is the method where all the MLNOs are generated
{
if(selectedvalue=="ResistantL")
{
string sql= "SELECT re_MLNO, MAX(re_SpecimenDate)-MIN(re_SpecimenDate) AS DaysSeronegative FROM ml_hiv_status WHERE (re_HIV1_Status=0) GROUP BY re_MLNO";
OleDbConnection connection = new OleDbConnection(HIV.Database.DataConstants.CONNECTION_STRING);
OleDbDataAdapter adapter = new OleDbDataAdapter();
OleDbCommand command = new OleDbCommand(sql, connection);
DataSet ds = new DataSet();
adapter.SelectCommand = command;
if (adapter.Fill(ds) > 0)
{
DataView view = ds.Tables[0].DefaultView;
mlno_DDL.DataSource = view;
mlno_DDL.DataValueField="re_MLNO";
mlno_DDL.DataTextField = "re_MLNO";
mlno_DDL.DataBind();
resultsLabel.Visible= true;
mlno_DDL.Items.Insert(0, "ANY");
}
connection.Close();
}
}
private void mlno_DDL_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
private void submitButton_Click(object sender, System.EventArgs e) //SubmitButton_Click method fetches all the data from the Database depending on the 2 values selected from the 2 dropdown list
{
if(Specific_Query_DDL.SelectedItem.Value=="ResistantL")
{
if(mlno_DDL.SelectedItem.Value=="ANY") //All the values from the Db are pulled if ANY is chosen from the second DDL
{
executeResistantListQuery_ANY();
}
else if(mlno_DDL.SelectedItem.Value!="ANY") //Data are pulled if a specific MLNO is chosen from the DB, and this one is not working as always ANY value is chosen from the postback method
{
executeResistantListQuery_MLNO(mlno_DDL.SelectedItem.Value);
}
}
}
Please help. Thank you.
|
|
|
|
|
skhan17 wrote: if (this.IsPostBack)
{
getMLNO(Specific_Query_DDL.SelectedItem.Value);
This will reset the selected item. This is still not the ASP.NET forum.
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.
|
|
|
|
|
Wrong forum. Go to ASP.NET forum.
|
|
|
|
|
Thank you all for your suggestion and very strong criticism. This is posted in ASP.NET as well and I don't want to have any reply anymore. Thanks again.
|
|
|
|
|
Please do not delete a message, it creates a mess and is against the rules.
When you're satisfied or no longer interested, edit the message to indicate so in the subject line.
|
|
|
|
|
Hello,
i have a very strange problem, i have a multi-threaded udp-server and a client. Everytime i send a datagram to my server i get a SocketException "Connection was closed by remote host". CONNECTION? in UDP?
I've made my UDP-Server directly with Sockets and not with UdpClient. But the same error i got as i had my server with UdpClient. I really don't know what's wrong there...
Does somebody knows something about this Exception? Can somebody help me please?
|
|
|
|
|
Maybe it has something to do with this[^]?
I'm not sure though
|
|
|
|
|
I am having the hardest time tyring to read from a Excel workbook and putting it into a listview.
I cannot seem to find any good examples online of how to do this with Excel 2007.
Below is basically what I have. It is a standard template. I will NOT know how many rows will be in the workbook either.
So what I am trying to do it take what is in the excel workbook and put it into a listview to get ready to IMPORT into a database.
The reason I am not using the OLB driver is because I didn't really like it. It tended to mess up formats or not import anything.
Excel.Application xla = new Excel.Application();
Excel.Workbook wb = xla.Workbooks.Open(txtFile.Text, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "\t", true, false, 0, true, false, false);
Excel.Sheets excelSheets = wb.Worksheets;
Excel.Worksheet ws = (Excel.Worksheet)excelSheets.get_Item(1);
int g = 1;
for (int i = 1; g <= ws.Rows.Count - 1; i++)
{
Excel.Range range = ws.get_Range("A" + i.ToString(), "J" + i.ToString());
System.Array _values = (System.Array)range.Cells.Value2;
ListViewItem lstItem = new ListViewItem();
lstItem.Text = _values.GetValue(g, 1).ToString();
lstItem.SubItems[1].Text = _values.GetValue(g, 2).ToString();
lstItem.SubItems[2].Text = _values.GetValue(g, 3).ToString();
lstItem.SubItems[3].Text = _values.GetValue(g, 4).ToString();
lstItem.SubItems[4].Text = _values.GetValue(g, 5).ToString();
lstItem.SubItems[5].Text = _values.GetValue(g, 6).ToString();
lstItem.SubItems[6].Text = _values.GetValue(g, 7).ToString();
lstItem.SubItems[7].Text = _values.GetValue(g, 8).ToString();
lstItem.SubItems[8].Text = _values.GetValue(g, 9).ToString();
lstItem.SubItems[9].Text = _values.GetValue(g, 10).ToString();
lstImport.Items.Add(lstItem);
g++;
}
xla.Quit();
|
|
|
|
|
If you're just telling us what your working on, then use Twitter or Facebook, otherwise clearly state the problem and/or question you have.
only two letters away from being an asset
|
|
|
|
|
Let me quote this out for you on what I'm trying to do:
So what I am trying to do it take what is in the excel workbook and put it into a listview to get ready to IMPORT into a database.
I did forget to put in the error. It is giving me a index out of range error. Now how about you state "Hey you forgot to post the error it was getting".
I understand that I forgot that. Now I did provide what I was TRYING to do.
So maybe you should read it before jumping down someones throat.
|
|
|
|
|
Jacob Dixon wrote: So what I am trying to do it take what is in the excel workbook and put it into a listview to get ready to IMPORT into a database.
Yes, you've stated that before. Repeating it doesn't change it.
Jacob Dixon wrote: Now how about you state "Hey you forgot to post the error it was getting".
No, it's your responsiblity to include all relavant information.
Jacob Dixon wrote: Now I did provide what I was TRYING to do.
So we are supposed to imply the difficulties and/or exceptions or errors you are getting simply because you've state what you are TRYING to do.
Jacob Dixon wrote: So maybe you should read it before jumping down someones throat.
Perhaps the same advice to you. Read this[^] and pay attention to item #2.
Jacob Dixon wrote: It is giving me a index out of range error.
Have you debugged this code? Where is it throwing this exception? Is it when accessing the Excel Workbook, Row or the ListViewItem. We're not here to debug your code for you.
only two letters away from being an asset
|
|
|
|
|
|
Thank you so much. I will give the free version a try.
Thanks again
|
|
|
|
|
Hi,
I am trying to write custom grammar to parse oracle statements. Can anyone point me to the right direction.
Thanks in advance.
|
|
|
|
|
Could you be a bit more specific as to:
1) what you are trying to achieve
2) what you have tried
3) what problems you encountered.
|
|
|
|
|
I want to write a parser that will allow me to take a pl/sql statement and ensure that the statement is correct based on some type of grammer that I will specify.
I have not tried anything yet because I dont even know where to start. I am looking for a resource which I can start using that will help me acheive my goal.
------------------------------------------------------------
1. Parse a selected plsql statement and validate it based on some grammar.
2. I have not tried anything yet because this is completely new to me. I am hoping someone can point me to some resource/documentation/tutorial that will help me acheive this task.
|
|
|
|
|
OK, but I don't think this is a technical C# question. I would suggest using Google, or the CodeProject search facility, looking for the keywords 'parse' and 'grammar' as a starting point.
|
|
|
|
|
I was hoping it was possible to do this in C#.
|
|
|
|