Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Tags
Member Avatar for mcupryk

Dim substr As String = dr.Item(4) if substr is {System.DBNull} substr = "" if substr is "" then do not do substr = substr.Substring(0, 2) else substr = substr.Substring(0, 2) I need this in vb.net

Member Avatar for Andyc75
0
337
Member Avatar for mcupryk

I need to remove the prefix(domain name) if exist in front of a username from a session variable. paramsql.Value = Session("ssNtUser") say the domain is za username is macupryk I would like to remove the za\ so in the session variable I have macupryk only but the domain name can …

Member Avatar for asxcode
0
225
Member Avatar for mcupryk

:rolleyes: I have the following with an ado.net routine called. Public Sub DoModify() Dim bm As BindingManagerBase = Me.DataGrid1.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember) Dim dr As DataRow = CType(bm.Current, DataRowView).Row Dim editform As New EditTransOverride(dr) oldPolicyNumber = dr.Item(1) oldTransCode = dr.Item(2) oldTransEffDate = dr.Item(3) Dim retval As DialogResult = editform.ShowDialog() If retval = …

0
88
Member Avatar for mcupryk

I have an sql table that consist of three key constraints Policy_Nbr, Trans_CodeOrig, Trans_Eff_Date. Now I need to create a stored procedure that will handle violations on the table. What I mean here is that the old values(three key constraints) when I do an update on the table should be …

0
86
Member Avatar for mcupryk

I have the following procedure SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO /* ------------------------------------------------------------ PROCEDURE: dbo.prc_TransOverride_upd Description: Updates a record In table 'dbo.prc_TransOverride_upd' ------------------------------------------------------------ */ CREATE PROCEDURE dbo.prc_TransOverride_upd ( @Policy_Nbr varchar(7), @Trans_CodeOrig varchar(6), @Trans_Eff_Date datetime, @Override_Code varchar(2), @NR_CodeOvr varchar(1), @Trans_CodeOvr varchar(6), @CreatedDate datetime, @CreatedUID nvarchar(48), @ModifiedDate datetime, @ModifiedUID nvarchar(48), …

0
89
Member Avatar for mcupryk

click on modify button? Public Sub DoModify() Dim bm As BindingManagerBase = Me.DataGrid1.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember) ===>>> Dim dr As DataRow = CType(bm.Current, DataRowView).Row <<<=== Dim editform As New EditTransOverride(dr) Dim retval As DialogResult = editform.ShowDialog() If retval = DialogResult.OK Then bm.EndCurrentEdit() Try Dim substr As String = dr.Item(4) substr = substr.Substring(0, …

0
66
Member Avatar for mcupryk

If you want to insert DON'T do this Dim dr As DataRow = CType(bm.Current, DataRowView).Row Dim addform As New AddTransOverride(dr) Dim retval As DialogResult = addform.ShowDialog() the above will modify the current row you are on, but do somethiing like this Dim dr As DataRow = bm.addnew 'or bm.new I …

0
46
Member Avatar for mcupryk

How do I pass a two character for dr.Item(4) in the following: ExecOnTransOverride.ins(dr.Item(1), dr.Item(2), dr.Item(3), dr.Item(4), dr.Item(5), dr.Item(6), dr.Item(8), dr.Item(7), DateTime.Now, dr.Item(7), dr.Item(9)) + dr.Item(1) "1234555" {String} Object + dr.Item(2) "CANADJ" {String} Object + dr.Item(3) #9/22/2005# {Date} Object + dr.Item(4) "ACCOUNT" {String} Object + dr.Item(5) "N" {String} Object + dr.Item(6) …

0
77
Member Avatar for mcupryk

I have a stored procedure and it is not saving the values in the table. How can I view that the stored procedure is saving the values. Private Sub DoSave() Dim ConnectionString As String = System.Configuration.ConfigurationSettings.AppSettings("FinSolMainDBConn") Dim connfinsol As New System.Data.SqlClient.SqlConnection(ConnectionString) Dim strsql As String Dim adapter As New SqlDataAdapter …

Member Avatar for Letscode
0
191
Member Avatar for mcupryk

I have the following structure defined in a given form called transoverride.vb Public Structure structTransoverride Public Account_Name As String End Structure at the top of my class (TransOverride) I have defined the following: Public TransOverrideStruct Public objTransoverride As structTransoverride I have a datagrid that when I select modify button on …

0
78
Member Avatar for mcupryk

When I am in Debug mode, I want to set the value of the textbox on the dialog form. What happens the dialog form appears before , even when I am starting debug bug mode. The values of the textbox in show dialog sub routine they appear to be set …

0
56
Member Avatar for mcupryk

I have the error coming when I call a dialog form passing a parameter. An unhandled exception of type 'System.Exception' occurred in microsoft.visualbasic.dll Additional information: Can't assign text to readonly, disabled or hidden C1Input control when its Text property is not detached. Public Sub DoModify() Dim dTable As DataTable = …

0
74
Member Avatar for mcupryk

I have the following two functions. My goal is to highlight a row in a datagrid and delete a row. Problem arises when I click on the delete button. Below are two sub routines for DoDelete. Which route should I go with? I have created stored procedure for deleting the …

0
77