|
I have an application that uses 2 Templates. Template 1 is a Dynamic template where the data is contantly changing. Template 2 is a static template which is bascially a continuation sheet of very static data. There are occasions where template 2 could over flow to a 3, 4, or more pages.
The templates have bookmarks on them and the application fills in the data using the bookmarks to create a final document.
Right now the program will open the first template and fill it out...then open the second template and fill it out....works great. I even have it looping through the second template and creating new documents from the template as needed. The end result is I have multiple open documents. I would like to end up with one document that uses template 1 as the first page and template 2 for any subsequent pages. Is this possible???
Ken
|
|
|
|
|
Hi all is it possible to calling a function in the code behind from java script
function? If so could you please tell me how to do it
|
|
|
|
|
No, it's not possible. The server code only exists when the page is created, once the page reaches the browser, the server code doesn't exist any more.
If you want to execute code on the server, you have to make a request to the server. One way to do this without reloading the page is to use AJAX.
---
b { font-weight: normal; }
|
|
|
|
|
hi
i want to know how export wave file from Resource on my program as wave file in any path on computer
thanks
thanks for all
|
|
|
|
|
I have a treeview in my form. When you click on one of the nodes (node 1 for this example) the _AfterSelect event executes code based on which node was selected.
I pull up another record and once the record has loaded I click on the treeview again (node 1) to have code executed for the new record.
I’m having problems where the treeview still retains node 1 that was selected for the first record so the _AfterSelect event is not triggered.
I’ve tried to use treeview.refresh and several other methods to try and refresh the treeview to not have any nodes selected when starting a new record. Unfortunately nothing I try works.
I’ve put in a workaround to select a node (node 4) that is not used normally to allow the user to click node 1 without having to worry about it not working because the previous record selected node 1.
Has anyone ran into this problem and do you have a workaround?
Lost in the vast sea of .NET
|
|
|
|
|
I found the solution from a suggestion on another forum and wanted to post it in case anyone else might be searching for help on this issue:
TreeView.SelectedNode = Nothing
It works great!!
Lost in the vast sea of .NET
|
|
|
|
|
Manuall set the treeview selected node to nothing when you want to clear all of the selections, e.g., TreeView1.SelectedNode=Nothing.
|
|
|
|
|
hi all
i have a datagrid which displays 5 columns, say productname,unitprice,quantity,tax,total
i got the result also, ie, values being displayed
but i want the quantity column to be editable, so that the user can edit to what he needs.
how can i modify my code so that only the quantity column is editable, and the remaining columns remain the same.
thanks in advance
|
|
|
|
|
Try this:
ProductTable = ProductDataset.Tables(0)
'Set 4 out of 5 columns to Read Only
ProductTable.Columns(1).ReadOnly = True
ProductTable.Columns(2).ReadOnly = True
ProductTable.Columns(4).ReadOnly = True
ProductTable.Columns(5).ReadOnly = True
Hope it helps
Lost in the vast sea of .NET
|
|
|
|
|
can anyone help me regarding this query,
The exception thrown is: "ORA-02005 implicit (-1) length not valid for this
bind or define datatype"
if i run the query independently on oracle i wont get any eaception but when
run thr the exception
i get this error, kindly help me regarding the same.
this is the details i get regarding the query
ORA-02005: implicit (-1) length not valid for this bind or define datatype
Cause: A negative length for the define variable was passed to a define
function.
Action: An explicit, non-negative, length parameter must be passed.
|
|
|
|
|
I've a converted Mainframe developer learning Vb.net. I have two functions I'm trying to work out.
1) Develop a function to reverse a number (Sample input: 256078; Sample output: 870652)\
2) Given two strings, S1 and S2, delete from S1 all those characters which occur in S2. Finally create and return a clean S1 with the relevant characters deleted. (Sample input: S1 = “David Fagone”, S2 = “iad”; Sample output: “Dv Fgone”
Thx,
Dave
Thanks,
Dave
|
|
|
|
|
[code]Public Function reverse(ByVal n As Integer) As Integer
Dim str As String = n.ToString
Dim temp As String = ""
For i As Integer = str.Length - 1 To 0 Step -1
temp += str.Chars(i)
Next
Return Integer.Parse(temp)
End Function[/code]
|
|
|
|
|
[code]Public Function clean(ByVal str1 As String, ByVal str2 As String) As String
Dim temp As String = ""
Dim f As Boolean
For i As Integer = 0 To str1.Length - 1
f = True
For j As Integer = 0 To str2.Length - 1
If str1.Chars(i) = str2.Chars(j) Then
f = False
End If
Next
If f Then
temp += str1.Chars(i)
End If
Next
Return temp
End Function
[/code]
|
|
|
|
|
You forgot to ask a question.
---
b { font-weight: normal; }
|
|
|
|
|
I guess I thought it would be easy to update a table, but evidently my code is incorrect.
This code keeps producing this error:
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.
whenever I make a change in the table and then press button1.
could anyone please explain why?
tia
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TickersTableAdapter.Fill(Me.DataSet1.Tickers)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.TickersTableAdapter.Update(Me.DataSet1.Tickers)
Me.DataSet1.AcceptChanges()
End Sub
End Class
|
|
|
|
|
hii
One simple way to solve this problem is to add atleast one record in the data base as you aspect it to be. or else just try to fill the primary record of the table with your value.
just try it and reply
bye
Nikhil Bandekar
Mumbai,
India
|
|
|
|
|
Hi Nikhil:
Yes, you are right that if I add a new row to the table then everything is OK. But how can update the table WITHOUT adding a new row?
thanks!
|
|
|
|
|
What does your SELECT SQL statement look like? Does it return a Primary Key column? (BTW: This is a MUST HAVE!) What does the UPDATE SQL statement look like or are you using a CommandBuilder to generate it?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks Dave, that was the problem. The table had no primary key!
Happy weekend!
chuck
|
|
|
|
|
...but why couldn't the error message say something like "table has no primary key!" or "$%()*&$)(*&%)(*#&$ (stuff that I can't understand): this error might be caused if the table has no primary key"
Just a thought...
BTW, I love vb.net despite these small issues. Didn't Gates say something about betting the company on .net. It's a good bet assuming there's enough people out there still writing code!
c
|
|
|
|
|
Because there's about a dozen reasons why an Update would affect 0 records. The problem has nothing to do with VB.NET. ADO.NET is what is reporting the error back to your code, but even then, it can't possibly know what caused it. It's just the SQL statement that failed, in the context of the database that it was used.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
My application was tested and almost ready to go to production, but seems to have gone wacky in the past day or two. Nothing seems to work correctly. I put a breakpoint into the program and during debugging VS came up with a message box "The source file has changed. It no longer matches the version of the file used to build the application being debugged.".
The only changes I've made the past few days were touchups to stored procedures that were renamed when we put them into production. I've tinkered around with the versioning with the publish feature.
Did I goof something up??? Has anyone encountered this error before, and if so, how did you fix your app???
Lost in the vast sea of .NET
|
|
|
|
|
Yes i have also observed this issue many times. The solution worked for me is in the Solution Explorer, Right Click your project solution and click rebuild solution.
Hope this helps
Mubashir
|
|
|
|
|
I think I might be able to help you I have also made this same mistake.
I accidently renamed the file outside vb.net eg (I went into mydocuments/ visual studios) and then i renamed the application i was developing. So visual basic .net could not find the file to save to. when you try to create a new program have you noticed that you have to create a name for it well when you do this it creates a file in your directory where all your programs are saved when they are in the development phase. The way to fix this is to either go back and change the file to it's orignal file name(the easiest way) or you will either have to restart creating it or you could try save as which might allow you to create another folder for the program you are developing.
I hope this helps
Ps I am sorry if this doesn't apply to youre problem.
|
|
|
|
|
Thanks for everyone's feedback. I didn't change the name of my project and the error eventually went away and I don't have a clue what I did wrong in the first place, or what I did to fix it.
My project is working fine now. Something was out of whack, but now it is working without a problem. If the problem comes up again, I'll keep your suggestions in mind.
Thanks!!!
Lost in the vast sea of .NET
|
|
|
|