Wednesday, May 12, 2010

Always Dry Before Period

pass values \u200b\u200bbetween forms reference

by this way we can call a form and get the values \u200b\u200bto continue the process.
function from which you call the new form is on standby until the way back to get focus

Dim F As New buscar_cliente
F. Owner = Me
F. ShowDialog ()
TextBox1.Text = Trim (F.textb)

for the reverse process, send values \u200b\u200bto the form that we use the following call:

form in the place we call an initializer with the number of parameters that we will send the form. in fiery form instantiate the form "form2" by putting the parameters that we will send you (at this moment the values \u200b\u200bobtained form 2).

To prevent the form to which the caller continues with the process, call the ShowDialog and form 2 as close to the way that we find over and destroy the instance created using dispose.

Public Class Form1 Private Sub Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm As New Form2 (1)
frm.ShowDialog()
frm.Dispose()
End Sub
End Class
Public Class Form2
Dim m_cod_cli
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Public Sub New(ByVal cod_cli As Integer)
InitializeComponent()
' Asignamos al campo el valor pasado
m_cod_cli = cod_cli
End Sub
End Class



Friday, April 30, 2010

Keffex Prostate Infection

object not set to an instance of an object

A problem I recently appeared on a Web project "Object reference not set to an instance of an object", the project in debug working properly but when I published and fit IIS was the problem, so trying different options and verify that the source of the error was realized that lay in the decimal points.

The locale decimal (.) Was correct but the IIS did not take it well, managing the comma as decimal separator (,)

The origin of the problem is that use multiple joints for consultations and so in consultations where he ran decimal number attached to the query is

select "+ value1 +"

got the errors, using comma for a new column.

The solution has already imagined,

in the system.web
globalization culture = "es-MX" uiCulture = "es-MX" /