|
Hi there.
I have a form with 3 combo boxes on, each with a random number of items in them.
What I am trying to do is to let the user select items from the combo boxes and then generate the sql query based on what they had selected, i would then want to display the results of this query in a datagrid view.
I am fairly sure i will need to use a sproc to pass parameters for the fields i will need from the app to the database but i am pretty much a vb novice and have only recently started using sql connections through it.
Any help would be greatly appreciated.
|
|
|
|
|
You don't need a stored proc, although if you don't use one, you would do well to use parameterised queries. However, if the text comes from a combobox, there's probably no harm in string mashing your SQL together.
Do you know how to do any of this, or are you hoping to have it all explained for you ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: there's probably no harm in string mashing your SQL together.
True but he can still use parameters for that extra security (its just a little bit more code)
|
|
|
|
|
Oh, I'd normally agree, but in this case, I got the feeling that just string mashing SQL was going to confuse him.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks Christian.
I am aware of how to create string queries but what part of the form would i insert the query? Would it be the button that the user clicks when they have chosen what they want from the combo boxes?
David
|
|
|
|
|
Yes , when else would you do it?
Well I guess you could also do it in the selectedindexchanged event off the comboboxes but that is making things more difficult then they need to be.
|
|
|
|
|
Well, that's entirely up to you, when do you want the query to run ? A button is easiest, as someone else said.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I like to merge PDF by PDFBox component(open source) using vb.net . I found a good article at http://www.vbforums.com/showthread.php?t=462929 . But it(code) makes a problem in page setup when a landscape and a portrait PDF are merge together. For example in merged PDF file takes the page setup of first PDF, if first pdf in portrait format then second pdf also in portrait format , So in merged PDF file content of second PDF cut down. Please help me over come this problem.
|
|
|
|
|
Why don't you ask the people who wrote or use the component you found ? Most people who read this, have never seen PDFBox, so how can we help you ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
Dear Friends,
I have my application as executable type. i would like to add my application, auto-start when my os starts also it should show in the task bar like Google talk, Yahoo Messenger. if possible please kindly provide the code.
Thanking you in advance
Regards
K. Rajesh Kumar
i am a fresher in software development i have so many doubts in .net so i need to ca
|
|
|
|
|
rajesh_ncc wrote: Google talk
Google also do a search engine. It's at www.google.com, but when you search for articles on doing this, you'll probably come back to code project, so better to just search the articles here, I think.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Use this code.
Dim regKey As Microsoft.Win32.RegistryKey
regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
regKey.SetValue("Birth", Application.ExecutablePath & " -startup")
regKey.Close()
Instant of Birth u can give ur Application name or Project Title Name.
modified on Tuesday, December 23, 2008 7:17 AM
|
|
|
|
|
NotifyIcon
|
|
|
|
|
FTW!
I am going to be Nostradamus and predict the next question........how do I show my app above the taskbar on the bottom right of the screen?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi Friends
I am Developing small project in windows application using vb.net,
In that application each and every form i had make rectangle Shape, so that i would like to make a line in that form corner.
if Possible any one help me to draw a line.
Thanking You
Regards
K. Rajesh Kumar
i am a fresher in software development i have so many doubts in .net so i need to ca
|
|
|
|
|
Just handle the paint event and draw your line there. Use Pens.Black instead of creating a new one, if you just want black.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Write this code in Paint event of your form
Dim g As System.Drawing.Graphics
Dim myPen As New Pen(Color.Black, 5)
Dim myRect As New Rectangle(0, 0, Me.Width, Me.Height)
g = Me.CreateGraphics
g.DrawRectangle(myPen, myRect)
g.Dispose()
|
|
|
|
|
|
You can't. USB is not a port, like Serial or Parallel. It is a bus, like the expansion slots inside the machine.
|
|
|
|
|
oh well thanks anyway
J.Hardy
|
|
|
|
|
i think u can write a windows script and merge with your vb.net application....
|
|
|
|
|
I am trying to send a print job using file association (Word file using shellexecute) using system.diagnostics.process class. I want to monitor the status of all the print jobs.
The problem is with the jobs that are successfully printed. As soon as the job is printed it it removed from the queue, so how to get the status of such jobs.
One way is to retain the printed jobs. But, i do not have the privileges to do that.
So is there any other way to get the "Success" Status of the print job.
Thanks in advance.
|
|
|
|
|
I am trying to send a print job using file association (Word file using shellexecute) using system.diagnostics.process class. I want to monitor the status of all the print jobs.
The problem is with the jobs that are successfully printed. As soon as the job is printed it it removed from the queue, so how to get the status of such jobs.
One way is to retain the printed jobs. But, i do not have the privileges to do that.
So is there any other way to get the "Success" Status of the print job.
|
|
|
|
|