|
The parameters you are adding contain string literals, you should be using the variables, trying to stuff "fund_id" into an .Int parameter is going to cause problems!
.Add("@fund_id", SqlDbType.Int, 0, "fund_id")
.Add("@bank_doc_ref_no", SqlDbType.NChar, 10, "bank_doc_ref_no")
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I tried this code to display the data in dGV on the form, but it display the datat as a inclined,not as it show in the DGV , row after row.
For i As Integer = 0 To Me.DataGridView1.Rows.Count - 1
For j = 0 To DataGridView1.ColumnCount - 1
Dim g As Graphics
g = Me.CreateGraphics()
Dim str As String = Me.DataGridView1.Rows(i).Cells(j).Value
Dim y, X As Integer
y += 20
X += 30
g.DrawString(str, New Font("Times New Roman", 12, FontStyle.Regular), Brushes.DarkGreen, X, y)
Next
Next
|
|
|
|
|
Dim y, X As Integer
y += 20
X += 30
What are these values supposed to represent? I think you need to initialise them with something meaningful.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
need to initialise them with something meaningful.
I didn't found any way about how to use them(X,Y)
|
|
|
|
|
Mangore75 wrote: I didn't found any way about how to use them(X,Y)
Then why are you using them, do you understand what they are for?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I used them y=y+1 and x=x+1 as I think that will print row after row and column after column after column, as I know by little information that I have.
by the way I'm not professional in using VB I'm still beginner.
|
|
|
|
|
Yes but you have not initialised them to any starting point before you add the offsets.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
And then:
1. g = Me.CreateGraphics() is an expensive operation; why is it inside nested loops?
2. Graphics is one of those classes that offer a Dispose method; so if you create (or order creation) of an instance, you should dispose of it too.
Taken together, create once, dispose once.
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
|
Because you care about the environment, and don't want big, expensive objects lingering around, possibly holding unmanaged resources, huge memory blocks, system resources, whatever. If you created it and it has a Dispose, call it when done with it.
More[^]
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
In VBA for excel I can lift a table from a website using the QueryTables.Add method.
Here is what I use within an existing excel page...
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.Website.com/Subdir", Destination:=Range("$A$1"))
.Name = "TableName"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
As you can see, this polls the website and then looks for the table on that website that I need to connect to.
However, I would like to do the same thing within a VB.Net application.
What method would I need, and are there any pointers you good people could help me out with?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
You can use the MSHTML library. The web page is a html document - so you can use a CreateDocumentFromURL and then read the returned document as a html tree.
HTH
|
|
|
|
|
Thanks, I knew there had to be a way!
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
I have a database with two tables Customers an loans. Customer table contain customer details like id, name, address etc. Loans table contain details of loans taken by customers like loan id, customer id, loan amount. I want to generate a report showing all customers and their loan amount regardless whether customers took loans or not. I tried to do this but it shows only customers who took loans. But i want to show all customers. How can i do this
|
|
|
|
|
That depends on the SQL query you used to get the data. Let's see it. Chances are, you're probably not using a LEFT OUTER JOIN to get all the records on the Customer side of the join.
BTW, this has nothing to do with VB.NET...
|
|
|
|
|
Dear all,
Please help to create pdf viewer in VB (only viewer - disable Save, SaveAs, Print options)
thanks
Jackson..
|
|
|
|
|
Please don't repost your question.
|
|
|
|
|
how to del. my repeated question
|
|
|
|
|
There should be a delete option in your post.
|
|
|
|
|
Not if there's a reaction to it - we wouldn't want orphaned reactions.
Bastard Programmer from Hell
|
|
|
|
|
Dear all,
Please help to create pdf viewer in VB (only viewer - disable Save, SaveAs, Print options)
thanks
Jackson..
|
|
|
|
|
|
thanks. but that codings is allow to SaveAs the file to another location..
actually wat i want na... that pdf viewer is not give access to do saveAs, Print, etc .......only to view the pdf file..
thanks..
|
|
|
|
|
..that means that there's a physical file, doesn't it. What's to stop me from opening that file using Acrobat?
Bastard Programmer from Hell
|
|
|
|
|
Adobe reader is give the permission to SaveAs & print.. but i need to view the pdf file without the option SAVEAS & Print...
|
|
|
|