|
Hii,
I m doing right now somewhat same like you.
So i insert one more section in footer & have place my subreport there.
Now it looks fine but I dnt whether this is a good way. ...for time being it is ok.
If you get some other idea please let me know.
My mail id ->priya_p233@yahoomail.com
bye.
priya
|
|
|
|
|
Is it working fine now or not?
priya
|
|
|
|
|
Hi,
Is there any best scope for declaring ADO.NET connection in .net web service?
Which is the best? Is it in modules scope or in local scope?
Thx
|
|
|
|
|
GoodID wrote: Is there any best scope for declaring ADO.NET connection in .net web service?
Create the connection, execute the query, release the connection. Keep the scope as local as possible. You should not keep connections hanging around.
|
|
|
|
|
Hi Mackay,
Is the creation of connection object on every call of funtion in web service can decrease the process response (because the scope is local)?
what is consequencess if I put the connection object in module with Friend declaration?
Thx for you reply
|
|
|
|
|
GoodID wrote: Is the creation of connection object on every call of funtion in web service can decrease the process response (because the scope is local)?
No. Connections are pooled by .NET so you are not actually creating a new connection to the database. You are getting one from the pool.
GoodID wrote: what is consequencess if I put the connection object in module with Friend declaration?
Do not store connection object. Store the connection string only. Allow .NET to do the pooling for you.
|
|
|
|
|
isn't connection pooling is base on connection object or is it automatically?
because in my understanding the connection pool is base on connection object (using global variable)..
Thanks for your reply
|
|
|
|
|
GoodID wrote: isn't connection pooling is base on connection object or is it automatically?
because in my understanding the connection pool is base on connection object (using global variable)..
Connection pooling is based on the connection string. If you use the same connection string you will retrieve connections from the same pool. The pool is held internally by .NET and is automatic.
|
|
|
|
|
Hi Mackay,
I already search google about connection pooling and you are right
Thanks for your reply. I think i got the anwser
Best regards,
|
|
|
|
|
Hello,
I have a datagrid on one form and I would like to fill in my main form when I double click on any record in the datagrid.
How can I do that? I am using VB.NET.
thanks, Joseph
programmer
|
|
|
|
|
hi,
So simple ,
jst refer all controls name by using relative formname.
e.g.
if your main form's name is "MainForm" & the form having datagrid where you r going to take records, its name is "RecordForm".
then
refer datagrid by that form's name
e.g. RecordForm.datagrid
suppose u hav to fill one value from datagrid's 1st col & 1st row in textbox present on MainForm then write-> textbox1.text= RecordForm.datagrid.item(1,1).value.
priya
|
|
|
|
|
Do I need to do anything regarding double clicking any record on the datagrid?
thanks, Joseph
programmer
|
|
|
|
|
You write the code in procedure
Private Sub MyDatagrid1_RowHeaderMouseDoubleClick(...)
''write code of filling mainform Here
''u can refer to select items of datagrid by
Mainform1.textbox1=MyDatagrid1.item(0,e.rowindex).value
Mainform1.textbox2=MyDatagrid1.item(1,e.rowindex).value
.....
.
.
''Like this fill all items of mainform
end sub
As user clicks on rowheader of datagrid's specific cell ur code will be generated
if again any doubt , do ask.
I wnt to ask that , Is all of controls on mainform are textboxes?
priya
|
|
|
|
|
Hi,
thank you for your help. It is going good. I am almost done with my application except the one that I am asking.
yes. all the fields are textboxes on the main form. I am getting this error when I click on the one of the datagrid cells.
Unable to cast object of type 'System.String' to type 'System.Windows.Forms.TextBox'.
here is my code:
Private Sub FSSCallerRecordsDataGridView_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles FSSCallerRecordsDataGridView.CellContentClick
Form3.HospitalNumberTextBox = FSSCallerRecordsDataGridView.Item(5, e.RowIndex).Value
P.S. Form3 is the main form. And the reason I wrote Item(5) is that Hospital number on the datagrid is column number 5. (is it correct)
*****Is it necessary I can email you the project?
thanks, joseph
programmer
|
|
|
|
|
'Form3.HospitalNumberTextBox' should be ---> 'Form3.HospitalNumberTextBox.Text'
|
|
|
|
|
Hello, I have a simple question.
I'm a developer from 15 years to date, but with another languages.
Although i have a litle knowledge about vb, I didn't do nothing since VB 3.0.
Where I can find usefull information about programming in vb.net, I don't need to know how to make a "hello world" form.
I want to know how to connect to SQL Server, My SQL, Oracle, and other DB.
How to make a good bussines aplication ...
Well that's all by now!
Regards Nicolas
|
|
|
|
|
Google, or a good book, seem like the obvious answers. This is one of many sites with many, many example programs you can download and play with, and good quality articles full of info.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
I agree with Christian.
One book comes to mind.
"An Introduction to Progamming Using Visual Basic.Net (Fifth Edition)
by David. I. Schneider."
That book comes with a cd full of examples
and I think also (but don't quote me on it) a 5 cd pack containing Visual Studio, MSDN libraries (and service pack 4 for the likes of win2k users).
Lots of examples are in the book and cd.
It covers multitude of concepts from "hello world" to complex accounting programs, and includes databases e.g. sequencial, relational, sql etc
and the use of datatables and datagrid etc
Published by Prentice Hall.
Cheers Rick
PS: The book also covers the concept and principles of class, polymorphism, inheritance and overriding. Schneider explains it well and the book is easy to follow.
These are a few of my favourite things...
Web Design - XHTML»CSS
Web Programming- JScript»JavaScript»XML»XSL»ASP.NET
Programming- 2d Games-GML»VB.NET
|
|
|
|
|
Thanks Christian and Richy, I will read some samples that I found on the net.
Im sure this site will give me al I need.
Best Regards from Argentina.
Nicolas Machado
|
|
|
|
|
Question I am using vb.net 2005. There is a form called login that has a data bound combobox. I am trying to pass that combobox back to my data tier, and extract the users selection using a query. i am unable to get the selected text from the combobox, however the textboxes login and logout work fine. i am able to update my access table once(with a blank for the combobox's value which is a primary key in the table)
I am un able to get the users selection from the combobox.
this is my data tier
Public Sub addLogIn(ByRef RefBindingSource As BindingSource, ByRef RefLogin As TextBox, ByRef RefLogOut As TextBox, ByRef RefPassword As TextBox, ByRef RefcboSalesRepsID As ComboBox)
MyAccountReceivableLogTableAdapter.InsertQueryComboBox(RefcboSalesRepsID.SelectedText, RefLogin.Text, RefLogOut.Text)
End Sub
and this is my form login:
Private Sub frmLogIn_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
MyLogDataSet = MyLogTableData.GetLogTableDataSet() ' a method in data tier, returns a data set
With MyBindingSource
.DataSource = Me.MyLogDataSet
.DataMember = "logtable"
.Sort = "sales rep id"
End With
With Me
With .cboSalesRepsIdLogInTab
.DisplayMember = "sales rep id"
.ValueMember = "sales rep id"
.DataSource = Me.MyBindingSource
.DataBindings.Add("text", MyBindingSource, "sales rep id", False, DataSourceUpdateMode.Never)
.SelectedIndex = 0
End With
.txtLogInInTab.DataBindings.Add("text", MyBindingSource, "log in", False, DataSourceUpdateMode.Never)
.txtLogOutInTab.DataBindings.Add("text", MyBindingSource, "log out", False, DataSourceUpdateMode.Never)
End With
Catch ex As Exception
End Try
End Sub
here is the calling method:
Private Sub btnPassWord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPassWord.Click
Try
MessageBox.Show(cboSalesRepsIdLogInTab.SelectedText)
MyLogin.addLogIn(MyBindingSource, txtLogInInTab, txtLogOutInTab, txtPassWord, cboSalesRepsID)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
|
|
|
|
|
hi,
Try one of Following->
MsgBox(cmbcust.Text)
MsgBox(cmbcust.SelectedItem)
MsgBox(cmbcust.SelectedText)
MsgBox(cmbcust.SelectedValue)
May it helps you, if not tell me wht error u get.
bye
priya
|
|
|
|
|
I have tried all of these and i get a blank messagebox. you have to access the data though the data set.
|
|
|
|
|
I tried the first one and it worked! i was confusing "selected text" with "text" thank you very much
|
|
|
|
|
I am trying to find out how to access the Graphics in the Preview Screen, when a screen saver is called with the /p #### option from the Display Properties Window for the screen, from the OS.
The ### passes back the handle to the Display Properties window, but how do I get from a handle to the actual window to manipulate it, or at least find its location so I can place graphics over the preview area?
The standard samples from C++ and C# don't seem to work if I try and translate them to VB.NET (2003)
Tom Verkaaik
|
|
|
|
|
I am writing code to clean a file and after the file is clean, I will get an exception saying
"object reference not set to an instance of an object". Any ideas?
Here is the code:
Private Sub CleanFilePF(ByVal File_Name As String, ByVal Temp_file As String)
Dim textline As String
Dim objReader As New System.IO.StreamReader(File_Name)
If System.IO.File.Exists(File_Name) = True Then
Do
textline = objReader.ReadLine
If textline.IndexOf("*") = 0 Then
Console.WriteLine(textline)
WriteFile(Temp_file, textline)
End If
Loop Until textline Is Nothing
If Not objReader Is Nothing Then
objReader.Close()
End If
End If
End Sub
When exception is thrown it highlights this line(If textline.IndexOf("*") = 0 Then)
Any suggestions would help!
jds1207
|
|
|
|