|
falles01 wrote: string sql = "select * from employees where employeeID= '" + empNamecomboBox.SelectedValue.ToString() + "' select * from Role where RoleID = '" + rolecomboBox.SelectedValue.ToString() + "')";
try an put a MessageBox.Show(sql); after you make this string and see whats being made. I think there is this extra ) at the end or this SQL Query is incomplete. I Can't understand why u'r having 2 selects in one SQL Statement.
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
This is two statements. Try running them seperately. Also, you're still passing Ids as strings, I assume this means they are strings in the DB, which is not efficient at all.
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 )
|
|
|
|
|
Yes you are right. I thought the following worked because I was testing them one by one, but if I want to search on the employee (being the first statement), then I can't. I can only search on division. I am guessing I need to put it in one statement. Could you show me with the correct notation how to do that? Also I was informed of the string sql from somewhere, but what do you suggest in place of that?
string sql = "select * from employees where employeeID= '" + empNamecomboBox.SelectedValue.ToString() + "' or managerID = '" + managercomboBox.SelectedValue.ToString() + "' or DivisionID = '" + divisioncomboBox.SelectedValue.ToString() + "' or RoleID = '" + rolecomboBox.SelectedValue.ToString() + "'";
sql = "select * from Role where RoleID= '" + rolecomboBox.SelectedValue.ToString() + "'";
sql = "select * from Manager where ManagerID= '" + managercomboBox.SelectedValue.ToString() + "'";
sql = "select * from Division where DivisionID= '" + divisioncomboBox.SelectedValue.ToString() + "'";
|
|
|
|
|
You were right these people are not good to work for.
I am going to leave and go back to my old job. I don't need to be this stressed.
|
|
|
|
|
I use datasets to connect to access 2003 mdb file, created an insert query to write to ole object field in one of my tables,when i want to write data which is a text file bytes, with size of more than 1 mb, only the first "1 kb" of the data is written to the field, when i get back the data from access file, i get truncated file with size of 1 kb. Why i cant write more than 1 kb to a ole object field??? i read from the help of access 2003 that the field holds up to 1gigabyte of data but i can write only 1 kb, i checked out the variables, traced parameters but i couldnt find my mistake mistake, i think there is a problem with Access.
Thank you for your concern.
---
TSTfile = File.ReadAllBytes(@OpenTSTFileDialog.FileName);
TSTfileBytes = new Byte[TSTfile.Length];
TSTfile.Read(TSTfileBytes, 0, TSTfileBytes.Length);
TSTfile.Close();
----
later i use
---
myGrupTablosuTableAdapter.grupTablosuInsertQuery(GroupNo,TSTfileBytes);
|
|
|
|
|
Hello,
I am having split container in Form application.
I am displaying another form in one pane of splitter. It is movable but it starts hiding if i want to move it across the pane of splitter.
I want to move it across the pane throughout the window.
How it is possible.
Thanks.
-- modified at 2:57 Friday 24th August, 2007
|
|
|
|
|
gajesh wrote: I am displaying another form in one pane of splitter
Is this possible?
I'm using .Net1.1 VS2003, and it's not possible to add a form to an panel container!
All the best,
Martin
|
|
|
|
|
Yes.
We can set MdiParent of form to current window and then Show().
|
|
|
|
|
Ok,
But where are you adding the SubForm.
Which one is the MDIContainer, panel (which doesn't work I guess) or mainform?
-- modified at 3:44 Friday 24th August, 2007
All the best,
Martin
|
|
|
|
|
I am sorry.
Bfore Show() we have to add form to panel.
Form1.MdiParent = this;
mButtonEmulator.Location = new(point...)
splitContainer1.Panel2.Controls.Add(Form1);
Form1.Show();
This should work.
Thanks
|
|
|
|
|
Ok,
What if you add the form to the splitcontainer.Controls instead of one of the panels?
Bring it to Front, will maybe do what you need.
All the best,
Martin
|
|
|
|
|
Have you tried Form.TopMost ?
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
All the best,
Martin
|
|
|
|
|
Setting Form.TopLevel (not TopMost) false would allow you to add it to a
Controls collection.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Ahhhh,
Thanks for the Info! (never needed it bevor)
All the best,
Martin
|
|
|
|
|
Sure it is! The Form class derives from Control, so it's possible to treat a form just like any other contorl on one. All you have to do is create a new instance of the form, then set it's TopLevel property to false.
Form2 myNewForm = new Form2();
myNewForm.TopLevel = false;
this.Controls.Add(myNewForm);
myNewForm.Show();
|
|
|
|
|
Hi,
How to check that USB Flash Memory is connected or not with Drive letter?
thank you in advance
|
|
|
|
|
Hello,
Look at the answere I gave here![^] or here[^]
All the best,
Martin
|
|
|
|
|
Hi all
I am writing a program in which I want to read all the column names of a table in db of sql server and against every column I want to check wether it is NULLABLE or not. I am using
MyDataset.Tables[0].Columns[j].AllowDBNull
property of dataset but it shows always a true. I mean all the columns are shown as NULLABLE.
Could someone help me?
-- modified at 1:44 Friday 24th August, 2007
Mujtaba
"If both of us are having one apple each and we exchange it, at the end we both will have one apple each. BUT if both of us are having one idea each and we exchange it, at the end both of us will be having two ideas each."
|
|
|
|
|
plz give to me new projects topics
nitin b saste
|
|
|
|
|
Why do people keep asking this ? How about a program that accepts speech input, and then takes requirements delivered in this manner, and spits out a working exe ?
Or was there some limit in scope of your request that you expected us to work out by voodoo or something ?
Think about what your skillset is, think about what you'd like to learn, and then come up with a project that fits. Or at least, give us something to go with.
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 )
|
|
|
|
|
|
Control and monitoring system for a nuclear power plant
Flight control system for the Airbus A380
Satellite navigation system to compete with the U.S. GPS
Launch control system for the Space Shuttle
|
|
|
|
|
Port .net to OpenVMS... please?
-- modified at 14:43 Friday 24th August, 2007
Oh, and IIS too.
|
|
|
|
|
Hi,
I have an SQL query
tring sql = "UPDATE employees SET Fullname = '" + textBox1.Text + "' Where EmployeeID = '" + employeeID + "'";
I am using Where EmployeeID = '" + employeeID + "'"; because I want the query to be based on what the user has selected in a seperato classes combobox. The above how, ever doesn't work. Nothing changes. Do you know if the query is somewhat incorrect?
Thank you
|
|
|
|