|
Which is the method you are using to execute query ?
|
|
|
|
|
Dim dr As OleDbDataReader = com.ExecuteReader()
hello
|
|
|
|
|
ghumman63 wrote: Dept="'ITS',"
Dept = Dept & "'MECH',"
Dept = Left(Dept, Len(Dept) - 1)
Why on earth are you doing all of this ?
In any case, your SQL looks completely wrong to me. The word 'table' is not needed, it's an error. I can't even work out what the tail end of the query is supposed to be doing.
It looks to me like you're making it up as you go, are you also new to SQL ? Either way, if you get an exception, tell us what it is, otherwise you leave us having to guess. My guess is, it's telling you the SQL is wrong, which it is. Try putting the SQL into the query analyser first, if it doesn't run in SQL Server, or access, or whatever, it won't run when C# tries to execute it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
my dear
it is
select * from tableabc where filedabc in ? "
here the space was a mistake ,, not in sql )
there is no exception ,, it simply doest not get any row from the oracle server, though there
are about to 20,000
records
thanks in advance
hello
|
|
|
|
|
I am surprised there is no error message, unless Oracle is different to SQL Server, or the parameter wrapping does some string mashing for you. You're passing something like
'parm1', 'parm2'
to the parameter. The correct SQL would be
select * from tableabc where filedabc in ('parm1', 'parm2')
if you take the string you're passing through and put it into the Oracle client tools, do you get any results ?
I take it your code is a simplified example, because you are in fact building a dynamic list of strings for the parameter ? Perhaps you need to post the actual code ? Or you need to at least look at the actual parameter being generated, in the debugger.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
wild card characters are used to match strings as
select * from table where name LIKE '%brown%';
but doesnt supports matching of dates,number
what will we do if we want approximate matching of dates and numbers??
$h@ma!|@
|
|
|
|
|
You do a select like
select * from table where created > DATEADD(month, -1, @date) and created < DATEADD(month, 1, @date)
this searches for a date within a month on either side of the date provided.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i have a dropdownlist .I press control button and select two values hwo to get this two values ?
|
|
|
|
|
which two values?
best regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
the two options which we had selected by pressing the control button of the listbox .
|
|
|
|
|
You can loop through the items and then get the selected one from that.
Apurva Kaushal
|
|
|
|
|
what r u exectly doing here?
U have one dropdownlist, one listbox and one control button.Right?
and u want to get selected two values of listbox on click of control button.
so what about dropdownlist?
please explain clearly
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
sorry for the misunderstanding which i generated .i have only one listbox control which selects more than two values by pressing contorl button. I want to have the selected values.
String drpDownVal = ((ListBox)Repeater1.Items[i].FindControl("item2")).SelectedValue.ToString();
thanks
|
|
|
|
|
for(int i=0;i<=ListBox1.Items.Count-1;i++)
{
if ( ListBox1.Items[i].Selected )
Response.Write(ListBox1.Items[i].Text);
}
|
|
|
|
|
ListBox listbox=(ListBox)Repeater1.Items[i].FindControl("item2");
ArrayList arr=new ArrayList();
for(int i=0;i<listbox.Items.Count-1;i++)
{
if(listbox.Items[i].Selected)
arr.Add(listbox1.Items[i].Text)
}
U will get array of selected items text
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Hey
i am new to asp.net.
I just made a small user control now i want to see it on a toolbox provided with visual Studio 2005 how can i do it...
Thank You
Vikram
|
|
|
|
|
HI vikram
Usercotnrol can't be added in toolbox
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Thanks.....
Vikram
I Code...
|
|
|
|
|
I am trying to change values of margins in Registry using C# but for path Software\\microsoft\\internet explorer\\pagesetup i got null reference, in regedit list i have path.
Code which I am using is:
RegistryKey pk = Registry.CurrentUser.OpenSubKey("Software\\microsoft\\internet explorer\\pagesetup", true);<br />
pk.SetValue("margin_top", "0.20000");<br />
Is there permisions case or anything else? How can I solve it? Thanks in help to everyone.
I Love SQL
|
|
|
|
|
I tried on admin User it worked...
sending you the code..
RegistryKey r = Registry.CurrentUser;
RegistryKey r1 = r.OpenSubKey("Software\\Microsoft\\Internet Explorer\\Page Setup",true);
r1.SetValue("Mykey", ".Net");
r1.Close();
Vikram
I Code...;)
|
|
|
|
|
Thanks for your reply.
I can figure that if user is not admin then user can not change values in registy so I'm gonna leave this option and as option I will call Print Preview with javascript.
If you ever have called Print Preview with Javascritp plz share me code.
Regards
I Love SQL
|
|
|
|
|
I allready found way how to open print preview using Javascript.
Thanks for your time
I Love SQL
|
|
|
|
|
hi,
I am facing a problem with window.showModalDialog() when working with
parent child pages in asp, my problem is ,i am unable to get the values
that
set on the child page to paent page
the scenerio is
(Parent page)
parent.aspx --contains a button say ShowChildBtn,a label
MessageFromChildLabel
------------------------------------------
in the button click I wrote the following code
protected void ShowChildBtn_Click(object sender, EventArgs e)
{
session["Var1"]="Page 1";
string script = "<script
language="\"JavaScript\"">window.showModalDialog('Child.aspx');";
Page.RegisterStartupScript("tempscript",script);
}
page_load of parent contains
if(session["Var2"]!=null)
{
MessageFromChildLabel.Text=session["Var2"].tostring();
}
Child.aspx --contains a button say ReturnToParentBtn,a label
MessageFromParentLabel
---------------------------------------------------
in the button click I wrote the following code
protected void ReturnToParentBtn_Click(object sender, EventArgs e)
{
MessageFromParentLabel.Text=session["Var1"].tostring();
session["Var2"]="Child Page";
string script = "<script
language="\"JavaScript\"">window.close();";
Page.RegisterStartupScript("tempscript",script);
}
when iam running the application
clicking the ShowChildBtn in parent.aspx
child window is getting popup with label containing "Page 1";
when i am clicking ReturnToParentBtn
session["Var2"] is storing a value and returning to parent.aspx
my PROBLEM IS HERE I WANT TO REFRESH THE PAGE AUTOMATICALLY,
SO THAT THE MessageFromChildLabel DISPLAYS A VALUE WITHOUt
manually refreshing the page
salmon
|
|
|
|
|
salmonraju wrote: my PROBLEM IS HERE I WANT TO REFRESH THE PAGE AUTOMATICALLY,
SO THAT THE MessageFromChildLabel DISPLAYS A VALUE WITHOUt
manually refreshing the page
Try Window.Opener.location.href='YourFile.aspx'
|
|
|
|
|
am using visual studio 2005express edition asp.net using c# and I am trying to create a popup calender so
when a user click on a image on the main form, a calender will then popup,
the user will select a date and the date will then be passed back to the main
form and populate a textbox. it works fine. but when i used master page for
all my pages and i put the textbox inside the content , the calender pops up
but when i select the date nothing happens .. the textbox was not populated
with the selected date from the calender and the window was not closed.
Here is my code
my main form i have 2 textboxs and 2 buttons to pick the date..for each button i have the script to cal the popup calendarwindow.
in the calendarpopup window i have one caledar control and one button the code for that is..
protected void cldrdate_SelectionChanged(object sender, EventArgs e)
{
txtdate.Text = cldrdate.SelectedDate.ToShortDateString();
Session["date"] = cldrdate.SelectedDate.ToShortDateString();
}
protected void Button2_Click(object sender, EventArgs e)
{
var MyArgs =document.getElementById('txtdate').value;
window.opener.update(MyArgs);
window.close();
}
it was working properly before using with the master pages..
hw can i do it with masterpages...plz help me..thanks..
|
|
|
|