|
sikhan555 wrote: I want to checked that the Value in InvoiceNo is must enter unique, i try so many things but i was unable.
Did you try to simply lookup the entered Invoice number in the database and see what it returned??
|
|
|
|
|
I was used the data reader for checking the duplicate record, I want to check the InvoiceNo (Format is Inv/001/2008) is not duplicating in the database. I am already asign primary key to InvoiceId.
Please tell me what i do for checking the duplicate record.
Thanks in advance.
sikhan
|
|
|
|
|
I already did. You don't use a DataReader to get all the records in the table and then search them. You write another query to the database looking for the entered invoice number. If it's there, meaning you get a record back from the database, you tell the user that the invoice already exists. If not, then it's a good invoice number. The SQL statement might look something like:
SELECT invoiceNumber FROM Invoices WHERE invoiceNumber = @userEnteredNumber
|
|
|
|
|
Why dont you add an index constrained to be unique to the 2nd column of the second databable in your database, then when trying to insert catch the error (duplicated key or violation of primary key (I dont remember the exact error)) but it should work
Alexei Rodriguez
|
|
|
|
|
hi all,
i create simple add ins for excel 2007 using vb.net. However it automatically add a setup project(which contains dependencies files & some other files) when i begin this application but this is not works for me.
Can anybody guide me that how can i create Setup/installer for my excel add ins ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
i have try to put all control in one form.it takes time to load the page.there are more then 2000 control in one page.can it be possible to make the page load faster.right now it take about 2 minutes to load the page.this are done for window mobile development.
@h3aR
|
|
|
|
|
Sounds like you need to rethink your design. 2000 controls on a form ? You're kidding right ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
2 minutes with 2000 controls on a mobile device is freakingly fast, if you ask me....
|
|
|
|
|
The only way to make it faster is to rethink your design and GREATLY reduce the number of controls you're using on this form. 2,000 controls is just an insane number to put on a form. Creating a new instance of a control is a very expensive operation and there is simply no way to speed that up.
|
|
|
|
|
ahzarmokhli wrote: there are more then 2000 control in one page
How do you find the right button to click?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Can Any body give me link for a software which is use to make setup of a VB.Net software i know how to make setup using vsiual studio ? but i need some other software of the same purpose
Thanx
help as a alias.
Be happy and make others happy.Cheer up...........
|
|
|
|
|
www.advancedinstaller.com[^] always works for me
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Hi,
I am creating installer. In that I am inclueded Licence.rtf file.
In the user interface I want to show Licence.rtf file. but only blank window appeared when installing the application.
How can I show the rtf file.
Thanks
|
|
|
|
|
By configuring your installer software properly.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anyone know how i can create a line graph using data from a microsoft access data source...
|
|
|
|
|
By using a third party component, or writing the code yourself.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Check out ZedGraph[^]. It will do what you want.
|
|
|
|
|
I have written much code in VBA and now I wanted to explore Visual Basic 2005.
My objective is to be able to open an excel file and to plug in a value in range ("A1") in the excel worksheet/workbook from a Visual Basic 2005 form.
Any help/sample code would be tremendously appreciated.
Thank you,
Gray
|
|
|
|
|
Hope this helps, make sure you add your references.
<br />
'Open in Excel<br />
Dim myExcel As New Microsoft.Office.Interop.Excel.Application()<br />
Dim workBook As Microsoft.Office.Interop.Excel.Workbook<br />
Dim workSheet As New Worksheet<br />
<br />
Try<br />
<br />
If myExcel Is Nothing Then<br />
'Failed to load Excell Object<br />
Else<br />
<br />
workBook = myExcel.Workbooks.Open("C:\myfile.xls", 0, True, 5, "", "", True, XlPlatform.xlWindows, "\t", False, False, 0, True, 1, 0)<br />
workSheet = workBook.ActiveSheet<br />
<br />
workSheet.Cells(1, 1) = "My value"<br />
<br />
workBook.Close()<br />
<br />
End If<br />
<br />
<br />
Catch ex As Exception<br />
'Handle Exception<br />
End Try<br />
<br />
myExcel.Close()<br />
|
|
|
|
|
Silly me, I forgot to save the document.
To do this, use workSheet.Save or workSheet.SaveAs(fileName).
|
|
|
|
|
Thank you so much Justin! It works and I couldn't be more thankful.
Again, thank you very much.
|
|
|
|
|
Microsoft Office Interop has loads of good stuff. Justin's example is just the beginning of it.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I created an SDI application with one form and one ListView control and loaded the data, showing by Groups, here is the code:
Me.ListView1.BeginUpdate()
With Me.ListView1
.View = View.Details
.Items.Clear()
.Columns.Clear()
.MultiSelect = False
.FullRowSelect = True
.GridLines = True
.ShowGroups = True
End With
If Me.ListView1.Columns.Count = 0 Then
Me.ListView1.Columns.Add("Request", 100, HorizontalAlignment.Left)
Me.ListView1.Columns.Add("Description", 200, HorizontalAlignment.Left)
Me.ListView1.Columns.Add("Date", 75, HorizontalAlignment.Center)
Me.ListView1.Columns.Add("Approver", 100, HorizontalAlignment.Left)
Me.ListView1.Columns.Add("Status", 100, HorizontalAlignment.Left)
End If
While (Reader.Read)
dt = CDate(Reader("RequestDate"))
ReqDate = String.Format("{0 }", dt)
Me.ListView1.Groups.Add(Reader("RequestedBy"), Reader("RequestedBy"))
Dim listItem As New ListViewItem(Reader("RequestNumber").ToString)
listItem.Group = Me.ListView1.Groups(Reader("RequestedBy").ToString)
listItem.SubItems.Add(Reader("OrderDescription").ToString)
listItem.SubItems.Add(ReqDate)
listItem.SubItems.Add(Reader("NextApprover").ToString)
listItem.SubItems.Add(Reader("StatusDescription").ToString)
Me.ListView1.Items.Add(listItem)
End While
Me.ListView1.EndUpdate()
The results were as expected, but when I added this form to my MDI app, where it is supposed to be used, it does not display the groups, but the rest of the column data is displayed fine. I have tried everything I knew off but no luck.
I will greatly appreciate if someone could offer any suggestions. Thanks.
|
|
|
|
|
Faruk Ansari wrote: The results were as expected, but when I added this form to my MDI app, where it is supposed to be used, it does not display the groups, but the rest of the column data is displayed fine. I have tried everything I knew off but no luck.
Are XP Visual Styles turned on in this project?? If not, the groups will not render. Grouping is only supported under Windows XP and above and only when EnableVisualStyles is turned on.
|
|
|
|