Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB . NET EXE running over network utilizing ADO 1

Status
Not open for further replies.

arniec

Programmer
Jul 22, 2003
49
0
0
US
I have a Visual Basic .Net front-end to a Microsoft Access back-end. The Back-end is stored on a network share and during development, all of which took place on my desktop system, things went fine. The program uses an ADO connection to the database with the line

Dim conn As New OleDb.OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
"\\networkshare\mydb.mdb")

This worked just fine. Now, however, I want to distribute this EXE to the end users and enable them to run it over a network. When I run it from the network, however, I receive the error message:

JIT Debugging failed with the following error: 0x800405a6

Please check the documentation topic 'Just-in-time debugging errors' for more information.

Well, I did some digging on these very forums and found that it is a security issue and I was able to resolve this by going into Administrative Tools -> .NET Wizards -> Adjust .NET Security and setting Local Intranet to "Full". Now it runs fine on my system, but this doesn't fix my problem.

This application will be run on dozens of systems across several sites where the users' computer policy does not enable them to even view Administrative Tools in their Control Panels. Thus, they are locked out. Having all of them copy the EXE file to their desktops is equally not an option.

Can someone please show me a solution to this problem?

BTW, I'm certain the problem lies in my database access, as I have commented the lines out and executed and it goes just fine, so the breech of the security policy is directly linked to the ADO.

THANK YOU...PLEASE help me. I can't have wasted all this development time.
 
Here's a link that might help you out:

.NET Framework Enterprise Security Policy Administration and Deployment

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
Thanks for the reply, jebenson, but our security policies really won't allow me to change this programatically on our users machines; if there's a change it needs to be at the application level, not the enterprise or OS level.

Any suggestions on that? Can it be done?

Thanks,
 
I don't think so. The whole point of the .NET Framework code access permissions it that an application can't give itself permissions. You'll have to talk to your network people and see if they will make a change to the security policy. If not, you will have to run the app from the users' machines (i.e., locally). If you have to go this route, it is possible to create an "intermediary" app that just checks the dates on the local exe and the exe on the server, and if the exe on the server is newer it will be copied to the local machine and run. At least that way you don't have to redeploy each time you make a change to the app.

Am I wrong about this? Does anybody else have any other information on this?

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
It doesn't help much but the best solution to your problem is to switch to SQL Server (although MSDE or SQL Server Express might be OK).

SQL Server doesn't use the security policy rules that are giving you grief and uses it own security system.

If your system is to be used by dozens of people at once Access just won't cut it. My experience is that anything over about 6 to 10 users updating the database simultaneously will cause endless problems with frequent lockups causing ODBC errors.

The only other thing you could try is to write a web service that runs on the PC where the Access DB is and use that to execute the actual queries on the DB.

Your client app would simply call the web service's methods to get hold of datasets and cause updates to happen. This is in essence what SQL Server and other DB engines do. To get the best performance from the web service however you would need to implement it as a threaded application with a pool of threads to handle incoming requests.


Bob Boffin
 
Bob,

I can move the database out of Access and into SQL easily enough, but will the same code then function? I have

Dim conn As New OleDb.OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
"\\networkshare\somefile.mdb")

If I just repoint that DB Connection to a SQL server will that solve all my problems?
 
You will need to change from OleDB to SQL:

Dim conn As New SQLClient.SQLConnection

and make some changes to the connection string. Here's an example:

"Data Source=[red]<Your SQL Server Name Here>[/red];Initial Catalog=[red]<Your Database Name Here>[/red];Trusted_Connection=Yes"


Also, you will need to change any DataAdapters from OleDbDataAdapters to SQLDataAdapters.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
The more I think about it, this option probably won't be as easy as I'd hoped as then I'd have to grant these users access to the SQL server, and the user base changes on a daily basis; there's no way to know the domain logins of all the users who will need this access.

also, the systems are configured differently on each system, so I can't be sure each person's local drive is the "C" drive, so the file copy wouldn't work without getting the system environment variable for the Windows directory. A quick test has shown this activity to also be blocked when run from a network location.

Further, about 70% of our users are using a remote desktop solution to log into a single PC which then runs the program. If I tried to have it copy to a PC and multiple users opened it concurrently, couldn't an error be processed if one person is copying the file and a second person starts the copy process, thus attempting to overwrite the file either in use or currently being copied to the host computer's local drive?

Please, more help????
 
From the sounds of it, you definately need to use a network based EXE, copying the file to the local computers will be a nightmare to manage.

If you're using SQL 2000 and above you can include an instance in Active Directory. This will allow you to "merge" the access into a group. My understanding of adding the instance to AD is that when the user is created all you have to do is join them to the group and they get access to your database. If this is indeed how it works, then that might be the easiest route for you. Of course, you will still need to change the connection string in your app. But since I'm sure you set up your connection using it's own class that won't be a big chore :p

Leeland
 
Macleod,

In its own class? No. But still not that hard to change. The problem here lies in the fact that the domain accounts are managed by another group who doesn't like to talk to us much; all our current SQL users must be added manually by us.

This could still possibly work, but in all honesty I've been programming in VB .NET for all of a week now. I need to be able to (hopefully easily) run insert, update, and delete queries and also to retrieve values from individual fields in a table. I'm posting my entire source code below. Can similar methods be used if I switch over to SQL Server, and if so, does anyone have a link to a resource where I can find the relevant methods?

Code:
Imports System
Imports System.Data
Imports System.Data.SqlClient

Public Class Form1
    Inherits System.Windows.Forms.Form

    'Our ADO connection to the database
    Dim conn As New OleDb.OleDbConnection( _
            "Provider=Microsoft.Jet.OLEDB.4.0;" & _
            "Data Source=" & _
            "\\Dtcnas-ilsp002\mis_dailytrend\DailyTrendData\dailytrenddata.mdb")
            '"c:\dailytrenddata.mdb")


    'IsDirty stores saved state of records - dirty = unsaved but changed.
    Public IsDirty As Boolean

    Public strLANID As String         'stores current LANID of user
    Public IsNewRecord As Boolean     'stores whether record should be appended or updated.

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call
        Dim sConnectionString As String _
        = "Provider=SQLOLEDB.1;User ID=<username>;Password=<strong password>;Initial Catalog=pubs;Data Source=(local)"

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents Label11 As System.Windows.Forms.Label
    Friend WithEvents Label12 As System.Windows.Forms.Label
    Friend WithEvents Label13 As System.Windows.Forms.Label
    Friend WithEvents Label14 As System.Windows.Forms.Label
    Friend WithEvents Label15 As System.Windows.Forms.Label
    Friend WithEvents Label16 As System.Windows.Forms.Label
    Friend WithEvents Label17 As System.Windows.Forms.Label
    Friend WithEvents Label18 As System.Windows.Forms.Label
    Friend WithEvents Label19 As System.Windows.Forms.Label
    Friend WithEvents Label20 As System.Windows.Forms.Label
    Friend WithEvents Label21 As System.Windows.Forms.Label
    Friend WithEvents cboSelectDeliverySite As System.Windows.Forms.ComboBox
    Friend WithEvents lstSelectReportDate As System.Windows.Forms.ListBox
    Friend WithEvents cmdSave As System.Windows.Forms.Button
    Friend WithEvents cmdAddRecord As System.Windows.Forms.Button
    Friend WithEvents Label22 As System.Windows.Forms.Label
    Friend WithEvents Label23 As System.Windows.Forms.Label
    Friend WithEvents Label24 As System.Windows.Forms.Label
    Friend WithEvents Label25 As System.Windows.Forms.Label
    Friend WithEvents Label26 As System.Windows.Forms.Label
    Friend WithEvents Label27 As System.Windows.Forms.Label
    Friend WithEvents Label28 As System.Windows.Forms.Label
    Friend WithEvents Label29 As System.Windows.Forms.Label
    Friend WithEvents Label30 As System.Windows.Forms.Label
    Friend WithEvents Label31 As System.Windows.Forms.Label
    Friend WithEvents Label32 As System.Windows.Forms.Label
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents Label33 As System.Windows.Forms.Label
    Friend WithEvents Label34 As System.Windows.Forms.Label
    Friend WithEvents Label35 As System.Windows.Forms.Label
    Friend WithEvents Label36 As System.Windows.Forms.Label
    Friend WithEvents Label37 As System.Windows.Forms.Label
    Friend WithEvents Label38 As System.Windows.Forms.Label
    Friend WithEvents Label39 As System.Windows.Forms.Label
    Friend WithEvents Label40 As System.Windows.Forms.Label
    Friend WithEvents Label41 As System.Windows.Forms.Label
    Friend WithEvents Label42 As System.Windows.Forms.Label
    Friend WithEvents Label43 As System.Windows.Forms.Label
    Friend WithEvents Label44 As System.Windows.Forms.Label
    Friend WithEvents cmdDeleteRecord As System.Windows.Forms.Button
    Friend WithEvents cmdExit As System.Windows.Forms.Button
    Friend WithEvents txtTurnTimeUWPurchLoansGov As System.Windows.Forms.TextBox
    Friend WithEvents txtVolumeUndecisionedRefiGov As System.Windows.Forms.TextBox
    Friend WithEvents txtTurnTimeRefiGov As System.Windows.Forms.TextBox
    Friend WithEvents txtVolumeReceivedOffSiteUW As System.Windows.Forms.TextBox
    Friend WithEvents txtTurnTimeRefiConv As System.Windows.Forms.TextBox
    Friend WithEvents txtVolumeReceivedSIMO As System.Windows.Forms.TextBox
    Friend WithEvents txtVolumeReceived As System.Windows.Forms.TextBox
    Friend WithEvents txtReportDate As System.Windows.Forms.TextBox
    Friend WithEvents txtTurntimeRefiFunding As System.Windows.Forms.TextBox
    Friend WithEvents txtTurnTimeRefiDocClosing As System.Windows.Forms.TextBox
    Friend WithEvents txtVolumeUndecisionedRefiConv As System.Windows.Forms.TextBox
    Friend WithEvents txtTurntimePurchaseFunding As System.Windows.Forms.TextBox
    Friend WithEvents txtTurnTimePurchaseDocClosing As System.Windows.Forms.TextBox
    Friend WithEvents txtVolumeUndecisionedPurchaseConv As System.Windows.Forms.TextBox
    Friend WithEvents txtTurnTimeUWPurchLoansConv As System.Windows.Forms.TextBox
    Friend WithEvents txtVolumeUndecisionedPurchaseGov As System.Windows.Forms.TextBox
    Friend WithEvents txtNumUnderwriters As System.Windows.Forms.TextBox
    Friend WithEvents txtVolumeFilesInOut As System.Windows.Forms.TextBox
    Friend WithEvents txtDatelastModified As System.Windows.Forms.TextBox
    Friend WithEvents txtLastUpdateBy As System.Windows.Forms.TextBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.cboSelectDeliverySite = New System.Windows.Forms.ComboBox
        Me.PictureBox1 = New System.Windows.Forms.PictureBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.lstSelectReportDate = New System.Windows.Forms.ListBox
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label10 = New System.Windows.Forms.Label
        Me.Label11 = New System.Windows.Forms.Label
        Me.Label12 = New System.Windows.Forms.Label
        Me.Label13 = New System.Windows.Forms.Label
        Me.Label14 = New System.Windows.Forms.Label
        Me.Label15 = New System.Windows.Forms.Label
        Me.Label16 = New System.Windows.Forms.Label
        Me.Label17 = New System.Windows.Forms.Label
        Me.Label18 = New System.Windows.Forms.Label
        Me.Label19 = New System.Windows.Forms.Label
        Me.Label20 = New System.Windows.Forms.Label
        Me.Label21 = New System.Windows.Forms.Label
        Me.cmdSave = New System.Windows.Forms.Button
        Me.cmdAddRecord = New System.Windows.Forms.Button
        Me.cmdDeleteRecord = New System.Windows.Forms.Button
        Me.cmdExit = New System.Windows.Forms.Button
        Me.Label22 = New System.Windows.Forms.Label
        Me.Label23 = New System.Windows.Forms.Label
        Me.Label24 = New System.Windows.Forms.Label
        Me.Label25 = New System.Windows.Forms.Label
        Me.Label26 = New System.Windows.Forms.Label
        Me.Label27 = New System.Windows.Forms.Label
        Me.txtTurnTimeUWPurchLoansGov = New System.Windows.Forms.TextBox
        Me.txtVolumeUndecisionedRefiGov = New System.Windows.Forms.TextBox
        Me.txtTurnTimeRefiGov = New System.Windows.Forms.TextBox
        Me.txtVolumeReceivedOffSiteUW = New System.Windows.Forms.TextBox
        Me.txtTurnTimeRefiConv = New System.Windows.Forms.TextBox
        Me.txtVolumeReceivedSIMO = New System.Windows.Forms.TextBox
        Me.txtVolumeReceived = New System.Windows.Forms.TextBox
        Me.txtReportDate = New System.Windows.Forms.TextBox
        Me.txtTurntimeRefiFunding = New System.Windows.Forms.TextBox
        Me.txtTurnTimeRefiDocClosing = New System.Windows.Forms.TextBox
        Me.txtVolumeUndecisionedRefiConv = New System.Windows.Forms.TextBox
        Me.txtTurntimePurchaseFunding = New System.Windows.Forms.TextBox
        Me.txtTurnTimePurchaseDocClosing = New System.Windows.Forms.TextBox
        Me.txtVolumeUndecisionedPurchaseConv = New System.Windows.Forms.TextBox
        Me.txtTurnTimeUWPurchLoansConv = New System.Windows.Forms.TextBox
        Me.txtVolumeUndecisionedPurchaseGov = New System.Windows.Forms.TextBox
        Me.Label28 = New System.Windows.Forms.Label
        Me.Label29 = New System.Windows.Forms.Label
        Me.Label30 = New System.Windows.Forms.Label
        Me.Label31 = New System.Windows.Forms.Label
        Me.Label32 = New System.Windows.Forms.Label
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label33 = New System.Windows.Forms.Label
        Me.Label34 = New System.Windows.Forms.Label
        Me.Label35 = New System.Windows.Forms.Label
        Me.Label36 = New System.Windows.Forms.Label
        Me.Label37 = New System.Windows.Forms.Label
        Me.Label38 = New System.Windows.Forms.Label
        Me.txtNumUnderwriters = New System.Windows.Forms.TextBox
        Me.txtVolumeFilesInOut = New System.Windows.Forms.TextBox
        Me.Label39 = New System.Windows.Forms.Label
        Me.Label40 = New System.Windows.Forms.Label
        Me.Label41 = New System.Windows.Forms.Label
        Me.Label42 = New System.Windows.Forms.Label
        Me.Label43 = New System.Windows.Forms.Label
        Me.Label44 = New System.Windows.Forms.Label
        Me.txtDatelastModified = New System.Windows.Forms.TextBox
        Me.txtLastUpdateBy = New System.Windows.Forms.TextBox
        Me.SuspendLayout()
        '
        'cboSelectDeliverySite
        '
        Me.cboSelectDeliverySite.BackColor = System.Drawing.Color.Aqua
        Me.cboSelectDeliverySite.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboSelectDeliverySite.ItemHeight = 13
        Me.cboSelectDeliverySite.Location = New System.Drawing.Point(192, 8)
        Me.cboSelectDeliverySite.Name = "cboSelectDeliverySite"
        Me.cboSelectDeliverySite.Size = New System.Drawing.Size(200, 21)
        Me.cboSelectDeliverySite.Sorted = True
        Me.cboSelectDeliverySite.TabIndex = 23
        '
        'PictureBox1
        '
        Me.PictureBox1.BackColor = System.Drawing.SystemColors.ControlDarkDark
        Me.PictureBox1.Location = New System.Drawing.Point(0, 0)
        Me.PictureBox1.Name = "PictureBox1"
        Me.PictureBox1.Size = New System.Drawing.Size(1600, 40)
        Me.PictureBox1.TabIndex = 1
        Me.PictureBox1.TabStop = False
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.SystemColors.ControlDarkDark
        Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.ForeColor = System.Drawing.Color.Aqua
        Me.Label1.Location = New System.Drawing.Point(0, 8)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(168, 23)
        Me.Label1.TabIndex = 2
        Me.Label1.Text = "Select Delivery Site:"
        '
        'Label2
        '
        Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label2.Location = New System.Drawing.Point(16, 48)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(272, 16)
        Me.Label2.TabIndex = 3
        Me.Label2.Text = "Double-click a report date to load that record"
        '
        'lstSelectReportDate
        '
        Me.lstSelectReportDate.BackColor = System.Drawing.Color.Aqua
        Me.lstSelectReportDate.Location = New System.Drawing.Point(16, 72)
        Me.lstSelectReportDate.Name = "lstSelectReportDate"
        Me.lstSelectReportDate.Size = New System.Drawing.Size(216, 160)
        Me.lstSelectReportDate.TabIndex = 24
        '
        'Label3
        '
        Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label3.Location = New System.Drawing.Point(312, 48)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(312, 16)
        Me.Label3.TabIndex = 5
        Me.Label3.Text = "Purchase"
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(312, 72)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(192, 16)
        Me.Label4.TabIndex = 6
        Me.Label4.Text = "Underwriting Government Turn Time"
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(312, 96)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(240, 16)
        Me.Label5.TabIndex = 7
        Me.Label5.Text = "# Undecisioned for Reported Turn Time - Gov"
        '
        'Label6
        '
        Me.Label6.Location = New System.Drawing.Point(312, 120)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(192, 16)
        Me.Label6.TabIndex = 8
        Me.Label6.Text = "Underwriting Conventional Turn Time"
        '
        'Label7
        '
        Me.Label7.Location = New System.Drawing.Point(312, 144)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(240, 16)
        Me.Label7.TabIndex = 9
        Me.Label7.Text = "# Undecisioned for Reported Turn Time - Conv"
        '
        'Label8
        '
        Me.Label8.Location = New System.Drawing.Point(312, 168)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(176, 16)
        Me.Label8.TabIndex = 10
        Me.Label8.Text = "Doc/Closing Turn Time"
        '
        'Label10
        '
        Me.Label10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label10.Location = New System.Drawing.Point(312, 224)
        Me.Label10.Name = "Label10"
        Me.Label10.Size = New System.Drawing.Size(312, 16)
        Me.Label10.TabIndex = 12
        Me.Label10.Text = "Refi"
        Me.Label10.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'Label11
        '
        Me.Label11.Location = New System.Drawing.Point(312, 272)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(240, 16)
        Me.Label11.TabIndex = 13
        Me.Label11.Text = "# Undecisioned for Reported Turn Time - Gov"
        '
        'Label12
        '
        Me.Label12.Location = New System.Drawing.Point(312, 248)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(112, 16)
        Me.Label12.TabIndex = 14
        Me.Label12.Text = "UW Turn Time - Gov"
        '
        'Label13
        '
        Me.Label13.Location = New System.Drawing.Point(312, 296)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(176, 16)
        Me.Label13.TabIndex = 15
        Me.Label13.Text = "UW Turn Time - Conv"
        '
        'Label14
        '
        Me.Label14.Location = New System.Drawing.Point(312, 320)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(240, 16)
        Me.Label14.TabIndex = 16
        Me.Label14.Text = "# Undecisioned for Reported Turn Time - Conv"
        '
        'Label15
        '
        Me.Label15.Location = New System.Drawing.Point(312, 344)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(176, 16)
        Me.Label15.TabIndex = 17
        Me.Label15.Text = "Doc / Closing turn time"
        '
        'Label16
        '
        Me.Label16.Location = New System.Drawing.Point(312, 368)
        Me.Label16.Name = "Label16"
        Me.Label16.Size = New System.Drawing.Size(216, 16)
        Me.Label16.TabIndex = 18
        Me.Label16.Text = "Funding Turntime (Escrow States Only)"
        '
        'Label17
        '
        Me.Label17.Location = New System.Drawing.Point(312, 192)
        Me.Label17.Name = "Label17"
        Me.Label17.Size = New System.Drawing.Size(216, 16)
        Me.Label17.TabIndex = 19
        Me.Label17.Text = "Funding Turntime (Escrow States Only)"
        '
        'Label18
        '
        Me.Label18.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label18.Location = New System.Drawing.Point(-192, 392)
        Me.Label18.Name = "Label18"
        Me.Label18.Size = New System.Drawing.Size(1024, 1)
        Me.Label18.TabIndex = 20
        '
        'Label19
        '
        Me.Label19.BackColor = System.Drawing.Color.Black
        Me.Label19.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label19.Location = New System.Drawing.Point(-168, 424)
        Me.Label19.Name = "Label19"
        Me.Label19.Size = New System.Drawing.Size(1024, 4)
        Me.Label19.TabIndex = 21
        '
        'Label20
        '
        Me.Label20.Location = New System.Drawing.Point(120, 400)
        Me.Label20.Name = "Label20"
        Me.Label20.Size = New System.Drawing.Size(100, 16)
        Me.Label20.TabIndex = 22
        Me.Label20.Text = "Last Updated By"
        '
        'Label21
        '
        Me.Label21.Location = New System.Drawing.Point(336, 400)
        Me.Label21.Name = "Label21"
        Me.Label21.Size = New System.Drawing.Size(24, 16)
        Me.Label21.TabIndex = 23
        Me.Label21.Text = "On"
        '
        'cmdSave
        '
        Me.cmdSave.Location = New System.Drawing.Point(48, 440)
        Me.cmdSave.Name = "cmdSave"
        Me.cmdSave.Size = New System.Drawing.Size(96, 32)
        Me.cmdSave.TabIndex = 19
        Me.cmdSave.Text = "&Save"
        '
        'cmdAddRecord
        '
        Me.cmdAddRecord.Location = New System.Drawing.Point(192, 440)
        Me.cmdAddRecord.Name = "cmdAddRecord"
        Me.cmdAddRecord.Size = New System.Drawing.Size(96, 32)
        Me.cmdAddRecord.TabIndex = 20
        Me.cmdAddRecord.Text = "&Add New Record"
        '
        'cmdDeleteRecord
        '
        Me.cmdDeleteRecord.Location = New System.Drawing.Point(336, 440)
        Me.cmdDeleteRecord.Name = "cmdDeleteRecord"
        Me.cmdDeleteRecord.Size = New System.Drawing.Size(96, 32)
        Me.cmdDeleteRecord.TabIndex = 21
        Me.cmdDeleteRecord.Text = "&Delete Current Record"
        '
        'cmdExit
        '
        Me.cmdExit.Location = New System.Drawing.Point(480, 440)
        Me.cmdExit.Name = "cmdExit"
        Me.cmdExit.Size = New System.Drawing.Size(96, 32)
        Me.cmdExit.TabIndex = 22
        Me.cmdExit.Text = "E&xit"
        '
        'Label22
        '
        Me.Label22.Location = New System.Drawing.Point(16, 248)
        Me.Label22.Name = "Label22"
        Me.Label22.Size = New System.Drawing.Size(80, 16)
        Me.Label22.TabIndex = 28
        Me.Label22.Text = "Reporting Date"
        '
        'Label23
        '
        Me.Label23.Location = New System.Drawing.Point(16, 272)
        Me.Label23.Name = "Label23"
        Me.Label23.Size = New System.Drawing.Size(176, 16)
        Me.Label23.TabIndex = 29
        Me.Label23.Text = "Volume Received"
        '
        'Label24
        '
        Me.Label24.Location = New System.Drawing.Point(16, 296)
        Me.Label24.Name = "Label24"
        Me.Label24.Size = New System.Drawing.Size(176, 16)
        Me.Label24.TabIndex = 30
        Me.Label24.Text = "SIMO Volume Received"
        '
        'Label25
        '
        Me.Label25.Location = New System.Drawing.Point(16, 320)
        Me.Label25.Name = "Label25"
        Me.Label25.Size = New System.Drawing.Size(176, 16)
        Me.Label25.TabIndex = 31
        Me.Label25.Text = "Off-Site UW Volume Received"
        '
        'Label26
        '
        Me.Label26.Location = New System.Drawing.Point(16, 368)
        Me.Label26.Name = "Label26"
        Me.Label26.Size = New System.Drawing.Size(192, 16)
        Me.Label26.TabIndex = 32
        Me.Label26.Text = "# Underwriters (inc. lvl. 1 && contract)"
        '
        'Label27
        '
        Me.Label27.Location = New System.Drawing.Point(16, 344)
        Me.Label27.Name = "Label27"
        Me.Label27.Size = New System.Drawing.Size(184, 16)
        Me.Label27.TabIndex = 33
        Me.Label27.Text = "Files In/(Out) From Other Locations"
        '
        'txtTurnTimeUWPurchLoansGov
        '
        Me.txtTurnTimeUWPurchLoansGov.Location = New System.Drawing.Point(568, 72)
        Me.txtTurnTimeUWPurchLoansGov.Name = "txtTurnTimeUWPurchLoansGov"
        Me.txtTurnTimeUWPurchLoansGov.Size = New System.Drawing.Size(56, 20)
        Me.txtTurnTimeUWPurchLoansGov.TabIndex = 7
        Me.txtTurnTimeUWPurchLoansGov.Text = ""
        Me.txtTurnTimeUWPurchLoansGov.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtVolumeUndecisionedRefiGov
        '
        Me.txtVolumeUndecisionedRefiGov.Location = New System.Drawing.Point(568, 272)
        Me.txtVolumeUndecisionedRefiGov.Name = "txtVolumeUndecisionedRefiGov"
        Me.txtVolumeUndecisionedRefiGov.Size = New System.Drawing.Size(56, 20)
        Me.txtVolumeUndecisionedRefiGov.TabIndex = 14
        Me.txtVolumeUndecisionedRefiGov.Text = ""
        Me.txtVolumeUndecisionedRefiGov.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtTurnTimeRefiGov
        '
        Me.txtTurnTimeRefiGov.Location = New System.Drawing.Point(568, 248)
        Me.txtTurnTimeRefiGov.Name = "txtTurnTimeRefiGov"
        Me.txtTurnTimeRefiGov.Size = New System.Drawing.Size(56, 20)
        Me.txtTurnTimeRefiGov.TabIndex = 13
        Me.txtTurnTimeRefiGov.Text = ""
        Me.txtTurnTimeRefiGov.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtVolumeReceivedOffSiteUW
        '
        Me.txtVolumeReceivedOffSiteUW.Location = New System.Drawing.Point(240, 320)
        Me.txtVolumeReceivedOffSiteUW.Name = "txtVolumeReceivedOffSiteUW"
        Me.txtVolumeReceivedOffSiteUW.Size = New System.Drawing.Size(56, 20)
        Me.txtVolumeReceivedOffSiteUW.TabIndex = 4
        Me.txtVolumeReceivedOffSiteUW.Text = ""
        Me.txtVolumeReceivedOffSiteUW.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtTurnTimeRefiConv
        '
        Me.txtTurnTimeRefiConv.Location = New System.Drawing.Point(568, 296)
        Me.txtTurnTimeRefiConv.Name = "txtTurnTimeRefiConv"
        Me.txtTurnTimeRefiConv.Size = New System.Drawing.Size(56, 20)
        Me.txtTurnTimeRefiConv.TabIndex = 15
        Me.txtTurnTimeRefiConv.Text = ""
        Me.txtTurnTimeRefiConv.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtVolumeReceivedSIMO
        '
        Me.txtVolumeReceivedSIMO.Location = New System.Drawing.Point(240, 296)
        Me.txtVolumeReceivedSIMO.Name = "txtVolumeReceivedSIMO"
        Me.txtVolumeReceivedSIMO.Size = New System.Drawing.Size(56, 20)
        Me.txtVolumeReceivedSIMO.TabIndex = 3
        Me.txtVolumeReceivedSIMO.Text = ""
        Me.txtVolumeReceivedSIMO.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtVolumeReceived
        '
        Me.txtVolumeReceived.Location = New System.Drawing.Point(240, 272)
        Me.txtVolumeReceived.Name = "txtVolumeReceived"
        Me.txtVolumeReceived.Size = New System.Drawing.Size(56, 20)
        Me.txtVolumeReceived.TabIndex = 2
        Me.txtVolumeReceived.Text = ""
        Me.txtVolumeReceived.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtReportDate
        '
        Me.txtReportDate.Location = New System.Drawing.Point(176, 248)
        Me.txtReportDate.Name = "txtReportDate"
        Me.txtReportDate.Size = New System.Drawing.Size(120, 20)
        Me.txtReportDate.TabIndex = 1
        Me.txtReportDate.Text = ""
        Me.txtReportDate.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtTurntimeRefiFunding
        '
        Me.txtTurntimeRefiFunding.Location = New System.Drawing.Point(568, 368)
        Me.txtTurntimeRefiFunding.Name = "txtTurntimeRefiFunding"
        Me.txtTurntimeRefiFunding.Size = New System.Drawing.Size(56, 20)
        Me.txtTurntimeRefiFunding.TabIndex = 18
        Me.txtTurntimeRefiFunding.Text = ""
        Me.txtTurntimeRefiFunding.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtTurnTimeRefiDocClosing
        '
        Me.txtTurnTimeRefiDocClosing.Location = New System.Drawing.Point(568, 344)
        Me.txtTurnTimeRefiDocClosing.Name = "txtTurnTimeRefiDocClosing"
        Me.txtTurnTimeRefiDocClosing.Size = New System.Drawing.Size(56, 20)
        Me.txtTurnTimeRefiDocClosing.TabIndex = 17
        Me.txtTurnTimeRefiDocClosing.Text = ""
        Me.txtTurnTimeRefiDocClosing.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtVolumeUndecisionedRefiConv
        '
        Me.txtVolumeUndecisionedRefiConv.Location = New System.Drawing.Point(568, 320)
        Me.txtVolumeUndecisionedRefiConv.Name = "txtVolumeUndecisionedRefiConv"
        Me.txtVolumeUndecisionedRefiConv.Size = New System.Drawing.Size(56, 20)
        Me.txtVolumeUndecisionedRefiConv.TabIndex = 16
        Me.txtVolumeUndecisionedRefiConv.Text = ""
        Me.txtVolumeUndecisionedRefiConv.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtTurntimePurchaseFunding
        '
        Me.txtTurntimePurchaseFunding.Location = New System.Drawing.Point(568, 192)
        Me.txtTurntimePurchaseFunding.Name = "txtTurntimePurchaseFunding"
        Me.txtTurntimePurchaseFunding.Size = New System.Drawing.Size(56, 20)
        Me.txtTurntimePurchaseFunding.TabIndex = 12
        Me.txtTurntimePurchaseFunding.Text = ""
        Me.txtTurntimePurchaseFunding.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtTurnTimePurchaseDocClosing
        '
        Me.txtTurnTimePurchaseDocClosing.Location = New System.Drawing.Point(568, 168)
        Me.txtTurnTimePurchaseDocClosing.Name = "txtTurnTimePurchaseDocClosing"
        Me.txtTurnTimePurchaseDocClosing.Size = New System.Drawing.Size(56, 20)
        Me.txtTurnTimePurchaseDocClosing.TabIndex = 11
        Me.txtTurnTimePurchaseDocClosing.Text = ""
        Me.txtTurnTimePurchaseDocClosing.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtVolumeUndecisionedPurchaseConv
        '
        Me.txtVolumeUndecisionedPurchaseConv.Location = New System.Drawing.Point(568, 144)
        Me.txtVolumeUndecisionedPurchaseConv.Name = "txtVolumeUndecisionedPurchaseConv"
        Me.txtVolumeUndecisionedPurchaseConv.Size = New System.Drawing.Size(56, 20)
        Me.txtVolumeUndecisionedPurchaseConv.TabIndex = 10
        Me.txtVolumeUndecisionedPurchaseConv.Text = ""
        Me.txtVolumeUndecisionedPurchaseConv.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtTurnTimeUWPurchLoansConv
        '
        Me.txtTurnTimeUWPurchLoansConv.Location = New System.Drawing.Point(568, 120)
        Me.txtTurnTimeUWPurchLoansConv.Name = "txtTurnTimeUWPurchLoansConv"
        Me.txtTurnTimeUWPurchLoansConv.Size = New System.Drawing.Size(56, 20)
        Me.txtTurnTimeUWPurchLoansConv.TabIndex = 9
        Me.txtTurnTimeUWPurchLoansConv.Text = ""
        Me.txtTurnTimeUWPurchLoansConv.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtVolumeUndecisionedPurchaseGov
        '
        Me.txtVolumeUndecisionedPurchaseGov.Location = New System.Drawing.Point(568, 96)
        Me.txtVolumeUndecisionedPurchaseGov.Name = "txtVolumeUndecisionedPurchaseGov"
        Me.txtVolumeUndecisionedPurchaseGov.Size = New System.Drawing.Size(56, 20)
        Me.txtVolumeUndecisionedPurchaseGov.TabIndex = 8
        Me.txtVolumeUndecisionedPurchaseGov.Text = ""
        Me.txtVolumeUndecisionedPurchaseGov.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'Label28
        '
        Me.Label28.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label28.Location = New System.Drawing.Point(488, 80)
        Me.Label28.Name = "Label28"
        Me.Label28.Size = New System.Drawing.Size(80, 1)
        Me.Label28.TabIndex = 50
        '
        'Label29
        '
        Me.Label29.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label29.Location = New System.Drawing.Point(536, 104)
        Me.Label29.Name = "Label29"
        Me.Label29.Size = New System.Drawing.Size(32, 1)
        Me.Label29.TabIndex = 51
        '
        'Label30
        '
        Me.Label30.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label30.Location = New System.Drawing.Point(496, 128)
        Me.Label30.Name = "Label30"
        Me.Label30.Size = New System.Drawing.Size(72, 1)
        Me.Label30.TabIndex = 52
        '
        'Label31
        '
        Me.Label31.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label31.Location = New System.Drawing.Point(544, 152)
        Me.Label31.Name = "Label31"
        Me.Label31.Size = New System.Drawing.Size(24, 1)
        Me.Label31.TabIndex = 53
        '
        'Label32
        '
        Me.Label32.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label32.Location = New System.Drawing.Point(432, 176)
        Me.Label32.Name = "Label32"
        Me.Label32.Size = New System.Drawing.Size(136, 1)
        Me.Label32.TabIndex = 54
        '
        'Label9
        '
        Me.Label9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label9.Location = New System.Drawing.Point(504, 200)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(64, 1)
        Me.Label9.TabIndex = 55
        '
        'Label33
        '
        Me.Label33.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label33.Location = New System.Drawing.Point(416, 256)
        Me.Label33.Name = "Label33"
        Me.Label33.Size = New System.Drawing.Size(152, 1)
        Me.Label33.TabIndex = 56
        '
        'Label34
        '
        Me.Label34.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label34.Location = New System.Drawing.Point(536, 280)
        Me.Label34.Name = "Label34"
        Me.Label34.Size = New System.Drawing.Size(32, 1)
        Me.Label34.TabIndex = 57
        '
        'Label35
        '
        Me.Label35.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label35.Location = New System.Drawing.Point(424, 304)
        Me.Label35.Name = "Label35"
        Me.Label35.Size = New System.Drawing.Size(144, 1)
        Me.Label35.TabIndex = 58
        '
        'Label36
        '
        Me.Label36.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label36.Location = New System.Drawing.Point(544, 328)
        Me.Label36.Name = "Label36"
        Me.Label36.Size = New System.Drawing.Size(24, 1)
        Me.Label36.TabIndex = 59
        '
        'Label37
        '
        Me.Label37.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label37.Location = New System.Drawing.Point(424, 352)
        Me.Label37.Name = "Label37"
        Me.Label37.Size = New System.Drawing.Size(144, 1)
        Me.Label37.TabIndex = 60
        '
        'Label38
        '
        Me.Label38.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label38.Location = New System.Drawing.Point(504, 376)
        Me.Label38.Name = "Label38"
        Me.Label38.Size = New System.Drawing.Size(64, 1)
        Me.Label38.TabIndex = 61
        '
        'txtNumUnderwriters
        '
        Me.txtNumUnderwriters.Location = New System.Drawing.Point(240, 368)
        Me.txtNumUnderwriters.Name = "txtNumUnderwriters"
        Me.txtNumUnderwriters.Size = New System.Drawing.Size(56, 20)
        Me.txtNumUnderwriters.TabIndex = 6
        Me.txtNumUnderwriters.Text = ""
        Me.txtNumUnderwriters.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtVolumeFilesInOut
        '
        Me.txtVolumeFilesInOut.Location = New System.Drawing.Point(240, 344)
        Me.txtVolumeFilesInOut.Name = "txtVolumeFilesInOut"
        Me.txtVolumeFilesInOut.Size = New System.Drawing.Size(56, 20)
        Me.txtVolumeFilesInOut.TabIndex = 5
        Me.txtVolumeFilesInOut.Text = ""
        Me.txtVolumeFilesInOut.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'Label39
        '
        Me.Label39.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label39.Location = New System.Drawing.Point(96, 256)
        Me.Label39.Name = "Label39"
        Me.Label39.Size = New System.Drawing.Size(80, 1)
        Me.Label39.TabIndex = 64
        '
        'Label40
        '
        Me.Label40.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label40.Location = New System.Drawing.Point(104, 280)
        Me.Label40.Name = "Label40"
        Me.Label40.Size = New System.Drawing.Size(136, 1)
        Me.Label40.TabIndex = 65
        '
        'Label41
        '
        Me.Label41.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label41.Location = New System.Drawing.Point(136, 304)
        Me.Label41.Name = "Label41"
        Me.Label41.Size = New System.Drawing.Size(104, 1)
        Me.Label41.TabIndex = 66
        '
        'Label42
        '
        Me.Label42.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label42.Location = New System.Drawing.Point(168, 328)
        Me.Label42.Name = "Label42"
        Me.Label42.Size = New System.Drawing.Size(72, 1)
        Me.Label42.TabIndex = 67
        '
        'Label43
        '
        Me.Label43.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label43.Location = New System.Drawing.Point(192, 352)
        Me.Label43.Name = "Label43"
        Me.Label43.Size = New System.Drawing.Size(48, 1)
        Me.Label43.TabIndex = 68
        '
        'Label44
        '
        Me.Label44.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label44.Location = New System.Drawing.Point(192, 376)
        Me.Label44.Name = "Label44"
        Me.Label44.Size = New System.Drawing.Size(48, 1)
        Me.Label44.TabIndex = 69
        '
        'txtDatelastModified
        '
        Me.txtDatelastModified.BackColor = System.Drawing.SystemColors.Control
        Me.txtDatelastModified.BorderStyle = System.Windows.Forms.BorderStyle.None
        Me.txtDatelastModified.Location = New System.Drawing.Point(360, 400)
        Me.txtDatelastModified.Name = "txtDatelastModified"
        Me.txtDatelastModified.Size = New System.Drawing.Size(240, 13)
        Me.txtDatelastModified.TabIndex = 70
        Me.txtDatelastModified.TabStop = False
        Me.txtDatelastModified.Text = ""
        '
        'txtLastUpdateBy
        '
        Me.txtLastUpdateBy.BackColor = System.Drawing.SystemColors.Control
        Me.txtLastUpdateBy.BorderStyle = System.Windows.Forms.BorderStyle.None
        Me.txtLastUpdateBy.Location = New System.Drawing.Point(208, 400)
        Me.txtLastUpdateBy.Name = "txtLastUpdateBy"
        Me.txtLastUpdateBy.Size = New System.Drawing.Size(120, 13)
        Me.txtLastUpdateBy.TabIndex = 71
        Me.txtLastUpdateBy.TabStop = False
        Me.txtLastUpdateBy.Text = ""
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(640, 486)
        Me.Controls.Add(Me.txtLastUpdateBy)
        Me.Controls.Add(Me.txtDatelastModified)
        Me.Controls.Add(Me.txtVolumeFilesInOut)
        Me.Controls.Add(Me.txtNumUnderwriters)
        Me.Controls.Add(Me.txtVolumeUndecisionedPurchaseGov)
        Me.Controls.Add(Me.txtTurnTimeUWPurchLoansConv)
        Me.Controls.Add(Me.txtVolumeUndecisionedPurchaseConv)
        Me.Controls.Add(Me.txtTurnTimePurchaseDocClosing)
        Me.Controls.Add(Me.txtTurntimePurchaseFunding)
        Me.Controls.Add(Me.txtVolumeUndecisionedRefiConv)
        Me.Controls.Add(Me.txtTurnTimeRefiDocClosing)
        Me.Controls.Add(Me.txtTurntimeRefiFunding)
        Me.Controls.Add(Me.txtReportDate)
        Me.Controls.Add(Me.txtVolumeReceived)
        Me.Controls.Add(Me.txtVolumeReceivedSIMO)
        Me.Controls.Add(Me.txtTurnTimeRefiConv)
        Me.Controls.Add(Me.txtVolumeReceivedOffSiteUW)
        Me.Controls.Add(Me.txtTurnTimeRefiGov)
        Me.Controls.Add(Me.txtVolumeUndecisionedRefiGov)
        Me.Controls.Add(Me.txtTurnTimeUWPurchLoansGov)
        Me.Controls.Add(Me.Label44)
        Me.Controls.Add(Me.Label43)
        Me.Controls.Add(Me.Label42)
        Me.Controls.Add(Me.Label41)
        Me.Controls.Add(Me.Label40)
        Me.Controls.Add(Me.Label39)
        Me.Controls.Add(Me.Label38)
        Me.Controls.Add(Me.Label37)
        Me.Controls.Add(Me.Label36)
        Me.Controls.Add(Me.Label35)
        Me.Controls.Add(Me.Label34)
        Me.Controls.Add(Me.Label33)
        Me.Controls.Add(Me.Label9)
        Me.Controls.Add(Me.Label32)
        Me.Controls.Add(Me.Label31)
        Me.Controls.Add(Me.Label30)
        Me.Controls.Add(Me.Label29)
        Me.Controls.Add(Me.Label28)
        Me.Controls.Add(Me.Label27)
        Me.Controls.Add(Me.Label26)
        Me.Controls.Add(Me.Label25)
        Me.Controls.Add(Me.Label24)
        Me.Controls.Add(Me.Label23)
        Me.Controls.Add(Me.Label22)
        Me.Controls.Add(Me.cmdExit)
        Me.Controls.Add(Me.cmdDeleteRecord)
        Me.Controls.Add(Me.cmdAddRecord)
        Me.Controls.Add(Me.cmdSave)
        Me.Controls.Add(Me.Label21)
        Me.Controls.Add(Me.Label20)
        Me.Controls.Add(Me.Label19)
        Me.Controls.Add(Me.Label18)
        Me.Controls.Add(Me.Label17)
        Me.Controls.Add(Me.Label16)
        Me.Controls.Add(Me.Label15)
        Me.Controls.Add(Me.Label14)
        Me.Controls.Add(Me.Label13)
        Me.Controls.Add(Me.Label12)
        Me.Controls.Add(Me.Label11)
        Me.Controls.Add(Me.Label10)
        Me.Controls.Add(Me.Label8)
        Me.Controls.Add(Me.Label7)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.lstSelectReportDate)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.cboSelectDeliverySite)
        Me.Controls.Add(Me.PictureBox1)
        Me.Name = "Form1"
        Me.Text = "Update Data for Daily Trend Report"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'When the form loads we connect to the database and 
        'populate the delivery site drop down box
        Call ConnectToOdbc()
        PopulateDeliverySite()

        'The form has not been modified so we flip the boolean
        UnDirtify()

        'With no site selected we disable all the data fields
        DisableDataFields()

        'obtains current user's signon from environment variable - 
        'populates public var strLANID
        strLANID = Environ$("username")

        'next, check LANID against existing table, and populate delivery site if it's found.
        cboSelectDeliverySite.Text = LookupDeliverySite()

        'If a delivery site was found then we set up the form to 
        'add a new record to the database
        If Not cboSelectDeliverySite.Text = "" Then
            addRecord()

            Dim myCommand As New OleDb.OleDbCommand("SELECT DeliverySite, ReportDate " & _
                "FROM tblMasterInputData " & _
                "WHERE DeliverySite = " & sq(cboSelectDeliverySite.Text) & _
                " AND ReportDate = " & lb(txtReportDate.Text), conn)
            Dim myreader As OleDb.OleDbDataReader

            myreader = myCommand.ExecuteReader
            If myreader.Read <> False Then
                myreader.Close()
                selectRecord(cboSelectDeliverySite.Text, txtReportDate.Text)
            Else
                myreader.Close()
            End If
        Else
            DisableDataFields()
        End If
        cmdAddRecord.Enabled = False
        cmdDeleteRecord.Enabled = False
        'next, load the listbox with report dates for delivery site.  Dates in descending order.
        LoadlstSelectReportDate()


    End Sub

    Public Sub Dirtify()
        IsDirty = True
        If cmdSave.Enabled = False Then cmdSave.Enabled = True
        If cmdAddRecord.Enabled = True Then cmdAddRecord.Enabled = False
    End Sub

    Public Sub UnDirtify()
        IsDirty = False
        If cmdSave.Enabled = True Then cmdSave.Enabled = False
        If cmdAddRecord.Enabled = False Then cmdAddRecord.Enabled = True
    End Sub

    Public Sub PopulateDeliverySite()
        'Queries the back-end database to pull a list of all
        'delivery sites and populates the drop-down box.
        'This makes the addition of new sites an invisible
        'process so far as the database goes.

        Dim myCommand As New OleDb.OleDbCommand("Select deliverysite from tblLookupDeliverySite order by deliverysite", conn)
        Dim myreader As OleDb.OleDbDataReader

        myreader = myCommand.ExecuteReader
        Do Until myreader.Read = False
            cboSelectDeliverySite.Items.Add(myreader("deliverysite"))
        Loop
        myreader.Close()
    End Sub

    Public Sub ConnectToOdbc()
        'Opens the connection to the database which will be used
        'throughout the application
        Try
            conn.Open()
        Catch ex As Exception
            MessageBox.Show("A problem occurred connecting to the database.", "Could Not Connect", MessageBoxButtons.OK)
            Application.Exit()
        End Try

    End Sub

    Public Sub CloseOdbc()
        'closes the connection
        conn.Close()
    End Sub

    Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
        'ensures the connection is closed when the form shuts down
        CloseOdbc()
    End Sub

    Private Sub cboSelectDeliverySite_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboSelectDeliverySite.SelectedIndexChanged
        'looks for all available dates for the selected 
        'site.  

        'clears the current list, if any
        lstSelectReportDate.Items.Clear()

        LoadlstSelectReportDate()

        'queries the database and gets results
        DisableDataFields()
        'The form has not yet been modified.
        SetDefaultValues()
        UnDirtify()
        cmdDeleteRecord.Enabled = False
        cmdAddRecord.Enabled = True
        IsNewRecord = False
    End Sub

    Private Sub txtTurntimeRefiFunding_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTurntimeRefiFunding.TextChanged
        Dirtify()
    End Sub

    Private Sub txtTurnTimeRefiDocClosing_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTurnTimeRefiDocClosing.TextChanged
        Dirtify()
    End Sub

    Private Sub txtVolumeUndecisionedRefiConv_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtVolumeUndecisionedRefiConv.TextChanged
        Dirtify()
    End Sub

    Private Sub txtTurnTimeRefiConv_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTurnTimeRefiConv.TextChanged
        Dirtify()
    End Sub

    Private Sub txtVolumeUndecisionedRefiGov_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtVolumeUndecisionedRefiGov.TextChanged
        Dirtify()
    End Sub

    Private Sub txtTurnTimeRefiGov_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTurnTimeRefiGov.TextChanged
        Dirtify()
    End Sub

    Private Sub txtNumUnderwriters_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtNumUnderwriters.TextChanged
        Dirtify()
    End Sub

    Private Sub txtVolumeFilesInOut_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtVolumeFilesInOut.TextChanged
        Dirtify()
    End Sub

    Private Sub txtVolumeReceivedOffSiteUW_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtVolumeReceivedOffSiteUW.TextChanged
        Dirtify()
    End Sub

    Private Sub txtVolumeReceivedSIMO_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtVolumeReceivedSIMO.TextChanged
        Dirtify()
    End Sub

    Private Sub txtVolumeReceived_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtVolumeReceived.TextChanged
        Dirtify()
    End Sub

    Private Sub txtTurntimePurchaseFunding_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTurntimePurchaseFunding.TextChanged
        Dirtify()
    End Sub

    Private Sub txtTurnTimePurchaseDocClosing_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTurnTimePurchaseDocClosing.TextChanged
        Dirtify()
    End Sub

    Private Sub txtVolumeUndecisionedPurchaseConv_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtVolumeUndecisionedPurchaseConv.TextChanged
        Dirtify()
    End Sub

    Private Sub txtTurnTimeUWPurchLoansConv_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTurnTimeUWPurchLoansConv.TextChanged
        Dirtify()
    End Sub

    Private Sub txtVolumeUndecisionedPurchaseGov_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtVolumeUndecisionedPurchaseGov.TextChanged
        Dirtify()
    End Sub

    Private Sub txtTurnTimeUWPurchLoansGov_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtTurnTimeUWPurchLoansGov.TextChanged
        Dirtify()
    End Sub


    Private Sub lstSelectReportDate_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstSelectReportDate.DoubleClick
        Dim response As VariantType

        'make sure a value was selected
        If lstSelectReportDate.SelectedItem = Nothing Then Exit Sub

        'if the user has unsaved changes inform them of such
        If IsDirty = True Then
            response = MessageBox.Show("You have unsaved edits for this record.  Are you sure you want to view a different record?", "Abandon changes to this record", MessageBoxButtons.YesNo)
            If response = vbNo Then Exit Sub
        End If

        'continuing on...load the values
        selectRecord(cboSelectDeliverySite.Text, lstSelectReportDate.SelectedItem)

    End Sub

    Private Sub selectRecord(ByVal strDeliverySite As String, ByVal reportDate As Date)
        EnableDataFields()
        LoadDetails(strDeliverySite, reportDate)
        IsNewRecord = False
        UnDirtify()
        cmdSave.Enabled = False
        cmdDeleteRecord.Enabled = True
    End Sub

    Public Sub DisableDataFields()
        'called when new delivery site is selected.  user has option to select existing record or
        'add new record.
        txtReportDate.Enabled = False
        txtVolumeReceived.Enabled = False
        txtVolumeReceivedSIMO.Enabled = False
        txtVolumeReceivedOffSiteUW.Enabled = False
        txtVolumeFilesInOut.Enabled = False
        txtNumUnderwriters.Enabled = False

        txtTurnTimeUWPurchLoansGov.Enabled = False
        txtVolumeUndecisionedPurchaseGov.Enabled = False
        txtTurnTimeUWPurchLoansConv.Enabled = False
        txtVolumeUndecisionedPurchaseConv.Enabled = False
        txtTurnTimePurchaseDocClosing.Enabled = False
        txtTurntimePurchaseFunding.Enabled = False

        txtTurnTimeRefiGov.Enabled = False
        txtVolumeUndecisionedRefiGov.Enabled = False
        txtTurnTimeRefiConv.Enabled = False
        txtVolumeUndecisionedRefiConv.Enabled = False
        txtTurnTimeRefiDocClosing.Enabled = False
        txtTurntimeRefiFunding.Enabled = False

    End Sub

    Public Sub EnableDataFields()
        'called when user adds new record or selects existing record
        txtReportDate.Enabled = True
        txtVolumeReceived.Enabled = True
        txtVolumeReceivedSIMO.Enabled = True
        txtVolumeReceivedOffSiteUW.Enabled = True
        txtVolumeFilesInOut.Enabled = True
        txtNumUnderwriters.Enabled = True

        txtTurnTimeUWPurchLoansGov.Enabled = True
        txtVolumeUndecisionedPurchaseGov.Enabled = True
        txtTurnTimeUWPurchLoansConv.Enabled = True
        txtVolumeUndecisionedPurchaseConv.Enabled = True
        txtTurnTimePurchaseDocClosing.Enabled = True
        txtTurntimePurchaseFunding.Enabled = True

        txtTurnTimeRefiGov.Enabled = True
        txtVolumeUndecisionedRefiGov.Enabled = True
        txtTurnTimeRefiConv.Enabled = True
        txtVolumeUndecisionedRefiConv.Enabled = True
        txtTurnTimeRefiDocClosing.Enabled = True
        txtTurntimeRefiFunding.Enabled = True


    End Sub

    Public Sub SetDefaultValues()
        DefaultWorkingDate()
        txtVolumeReceived.Text = 0
        txtVolumeReceivedSIMO.Text = 0
        txtVolumeFilesInOut.Text = 0
        txtVolumeReceivedOffSiteUW.Text = 0
        txtNumUnderwriters.Text = 0

        txtTurnTimeUWPurchLoansGov.Text = 0
        txtVolumeUndecisionedPurchaseGov.Text = 0
        txtTurnTimeUWPurchLoansConv.Text = 0
        txtVolumeUndecisionedPurchaseConv.Text = 0
        txtTurnTimePurchaseDocClosing.Text = 0
        txtTurntimePurchaseFunding.Text = 0

        txtTurnTimeRefiGov.Text = 0
        txtVolumeUndecisionedRefiGov.Text = 0
        txtTurnTimeRefiConv.Text = 0
        txtVolumeUndecisionedRefiConv.Text = 0
        txtTurnTimeRefiDocClosing.Text = 0
        txtTurntimeRefiFunding.Text = 0

        txtDatelastModified.Text = ""
        txtLastUpdateBy.Text = ""

    End Sub

    Public Sub DefaultWorkingDate()
        'set default report date to previous business day (excluding holidays)
        'this is done PURELY for convenience, and can be changed by the user.
        Dim workingdate As Date
        workingdate = DateAdd(DateInterval.Day, -1, Now())
        While Weekday(workingdate) = 1 Or Weekday(workingdate) = 7
            workingdate = DateAdd(DateInterval.Day, -1, workingdate)
        End While
        txtReportDate.Text = Format(workingdate, "short date")
    End Sub

    Public Sub LoadDetails(ByVal strDeliverySite As String, ByVal reportDate As Date)
        'this sub accepts delivery site and report date as arguments and retrieves the details for that record.
        'it also populates the form field values

        Dim myCommand As New OleDb.OleDbCommand("SELECT * from tblMasterInputData " & _
            "WHERE(DeliverySite = " & sq(strDeliverySite) & " And ReportDate = " & lb(reportDate) & ")", conn)
        Dim myreader As OleDb.OleDbDataReader

        myreader = myCommand.ExecuteReader
        If myreader.Read <> False Then
            txtReportDate.Text = Format(reportDate, "short date")
            txtVolumeReceived.Text = myreader("VolumeReceived")
            txtVolumeReceivedSIMO.Text = myreader("VolumeReceivedSIMO")
            txtVolumeFilesInOut.Text = myreader("VolumeFilesInOut")
            txtVolumeReceivedOffSiteUW.Text = myreader("VolumeReceivedOffSiteUW")
            txtNumUnderwriters.Text = myreader("NumUnderwriters")

            txtTurnTimeUWPurchLoansGov.Text = myreader("TurnTimeUWPurchLoansGov")
            txtVolumeUndecisionedPurchaseGov.Text = myreader("VolumeUndecisionedPurchaseGov")
            txtTurnTimeUWPurchLoansConv.Text = myreader("TurnTimeUWPurchLoansConv")
            txtVolumeUndecisionedPurchaseConv.Text = myreader("VolumeUndecisionedPurchaseConv")
            txtTurnTimePurchaseDocClosing.Text = myreader("TurnTimePurchaseDocClosing")
            txtTurntimePurchaseFunding.Text = myreader("TurnTimePurchaseFunding")
            txtTurnTimeRefiGov.Text = myreader("TurnTimeRefiGov")
            txtVolumeUndecisionedRefiGov.Text = myreader("VolumeUndecisionedRefiGov")
            txtTurnTimeRefiConv.Text = myreader("TurnTimeRefiConv")
            txtVolumeUndecisionedRefiConv.Text = myreader("VolumeUndecisionedRefiConv")
            txtTurnTimeRefiDocClosing.Text = myreader("TurnTimeRefiDocClosing")
            txtTurntimeRefiFunding.Text = myreader("TurnTimeRefiFunding")

            txtDatelastModified.Text = myreader("DatelastModified")
            txtLastUpdateBy.Text = myreader("LastUpdateBy")
        Else
            txtVolumeReceived.Text = ""
            txtVolumeReceivedSIMO.Text = ""
            txtVolumeFilesInOut.Text = ""
            txtVolumeReceivedOffSiteUW.Text = ""
            txtNumUnderwriters.Text = ""

            txtTurnTimeUWPurchLoansGov.Text = ""
            txtVolumeUndecisionedPurchaseGov.Text = ""
            txtTurnTimeUWPurchLoansConv.Text = ""
            txtVolumeUndecisionedPurchaseConv.Text = ""
            txtTurnTimePurchaseDocClosing.Text = ""
            txtTurntimePurchaseFunding.Text = ""

            txtTurnTimeRefiGov.Text = ""
            txtVolumeUndecisionedRefiGov.Text = ""
            txtTurnTimeRefiConv.Text = ""
            txtVolumeUndecisionedRefiGov.Text = ""
            txtTurnTimeRefiDocClosing.Text = ""
            txtTurntimeRefiFunding.Text = ""

            txtDatelastModified.Text = ""
            txtLastUpdateBy.Text = ""
            IsNewRecord = True
            txtReportDate.ReadOnly = True
        End If
        myreader.Close()
    End Sub

    'single quote wrapper function
    Public Function sq(ByVal strIN As String) As String
        sq = "'" & strIN & "'"
    End Function
    '# sign wrapper function
    Public Function lb(ByVal strIN As Object) As String
        lb = "#" & strIN & "#"
    End Function

    Private Sub cmdAddRecord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAddRecord.Click
        addRecord()
    End Sub

    Private Sub addRecord()
        EnableDataFields()
        txtReportDate.ReadOnly = False
        UnDirtify()
        IsNewRecord = True
        SetDefaultValues()
        cmdDeleteRecord.Enabled = False
        cmdSave.Enabled = False
        txtReportDate.Select()
    End Sub
    Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click

        Dim response As VariantType
        'if the user has unsaved changes inform them of such
        If IsDirty = True Then
            response = MessageBox.Show("You have unsaved edits for this record.  Do you wish to exit without saving this record?", "Exit without saving", MessageBoxButtons.YesNo)
            If response = vbNo Then Exit Sub
        End If
        CloseOdbc()
        Application.Exit()
    End Sub

    Public Function LookupDeliverySite() As String
        'uses public var strLANID to execute a lookup against the Delivery Site table in THIS database.
        'used to autopopulate cboSelectDeliverySite
        Dim myCommand As New OleDb.OleDbCommand("SELECT * from tblLANID " & _
                "WHERE(LANID = " & sq(strLANID) & ")", conn)
        Dim myreader As OleDb.OleDbDataReader

        myreader = myCommand.ExecuteReader
        If myreader.Read <> False Then
            LookupDeliverySite = myreader("DeliverySite")
        Else
            LookupDeliverySite = ""
        End If

        myreader.Close()
    End Function

    Private Sub lstSelectReportDate_DblClick(ByVal Cancel As Integer)
        Dim response As Integer

        If IsDirty Then
            response = MsgBox("You have unsaved edits for this record.  Are you sure you want to view a different record?", vbYesNo, "Abandon changes to this record")
            If response = vbNo Then
                Exit Sub
            End If
        End If
        selectRecord(cboSelectDeliverySite.Text, lstSelectReportDate.Text)
    End Sub

    Public Sub LoadlstSelectReportDate()
        Dim myCommand As New OleDb.OleDbCommand("SELECT ReportDate, DateLastModified,LastUpdateBy " & _
                               "FROM tblMasterInputData " & _
                               "WHERE DeliverySite = '" & cboSelectDeliverySite.Text & _
                               "' ORDER BY ReportDate DESC", conn)
        Dim myreader As OleDb.OleDbDataReader

        myreader = myCommand.ExecuteReader

        lstSelectReportDate.Items.Clear()

        'add items to the list box
        Do Until myreader.Read = False
            lstSelectReportDate.Items.Add(Format(myreader("reportdate"), "short date"))
        Loop
        myreader.Close()

    End Sub

    Private Sub cmdDeleteRecord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDeleteRecord.Click
        Dim strSQL As String
        Dim response As Integer
        strSQL = "DELETE * FROM tblMasterInputData " & _
            "WHERE DeliverySite = " & sq(cboSelectDeliverySite.Text) & _
            " AND ReportDate = " & lb(txtReportDate.Text)
        Dim myCommand As New OleDb.OleDbCommand(strSQL, conn)


        response = MsgBox("Are you sure you want to delete the " & txtReportDate.Text & " for " & cboSelectDeliverySite.Text & "?", vbYesNo, "Delete Record!")

        If response = vbYes Then
            myCommand.ExecuteNonQuery()
            DisableDataFields()
            LoadlstSelectReportDate()
            IsNewRecord = False
            lstSelectReportDate.Focus()
            cmdSave.Enabled = False
            cmdDeleteRecord.Enabled = False
            cmdAddRecord.Enabled = True
            Me.SetDefaultValues()
            UnDirtify()
        End If

    End Sub

    Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
        Dim strSQL As String
        Dim myCommand As OleDb.OleDbCommand

        'validate report date - not in the future.
        If CDate(txtReportDate.Text) > Format(Now, "Short Date") Then
            MsgBox("Report Date cannot be in the future.", vbExclamation, "Future report date")
            txtReportDate.Focus()
            Exit Sub
        End If

        'determine if record is a new record or an existing record
        If IsNewRecord Then
            'new record - append record
            AppendDetails()
            LoadlstSelectReportDate()
        Else
            'existing record - update record
            UpdateDetails()
        End If

        'if existing LANID, then update delivery Site for that LANID
        myCommand = New OleDb.OleDbCommand("SELECT LANID " & _
                "FROM tblLANID WHERE LANID = " & _
                sq(strLANID), conn)
        Dim myreader As OleDb.OleDbDataReader

        myreader = myCommand.ExecuteReader


        If myreader.Read <> False Then
            myreader.Close()
            strSQL = "UPDATE tblLANID set DeliverySite = " & sq(cboSelectDeliverySite.Text) & " WHERE LANID = " & sq(strLANID)
            myCommand = New OleDb.OleDbCommand(strSQL, conn)
            myCommand.ExecuteNonQuery()
        Else
            'if no update occurred, then insert new record into tblLANID
            myreader.Close()
            strSQL = "INSERT INTO tblLANID VALUES(" & _
            sq(strLANID) & "," & sq(cboSelectDeliverySite.Text) & ")"
            myCommand = New OleDb.OleDbCommand(strSQL, conn)
            myCommand.ExecuteNonQuery()
        End If

        'reselect record!
        selectRecord(cboSelectDeliverySite.Text, txtReportDate.Text)
        myreader.Close()
    End Sub

    Public Sub UpdateDetails()
        Dim strSQL As String
        Dim strNumUnderwriters As String
        strNumUnderwriters = IIf(Len(txtNumUnderwriters.Text) > 0, txtNumUnderwriters.Text, "0")

        strSQL = "Update tblMasterInputData SET " & _
                 "VolumeReceived = " & txtVolumeReceived.Text & "," & _
                 "VolumeReceivedSIMO = " & txtVolumeReceivedSIMO.Text & "," & _
                 "VolumeFilesInOut = " & txtVolumeFilesInOut.Text & "," & _
                 "VolumeReceivedOffSiteUW = " & txtVolumeReceivedOffSiteUW.Text & "," & _
                 "NumUnderwriters = " & strNumUnderwriters & "," & _
                 "TurnTimeUWPurchLoansGov = " & txtTurnTimeUWPurchLoansGov.Text & "," & _
                 "VolumeUndecisionedPurchaseGov = " & txtVolumeUndecisionedPurchaseGov.Text & "," & _
                 "TurnTimeUWPurchLoansConv = " & txtTurnTimeUWPurchLoansConv.Text & "," & _
                 "VolumeUndecisionedPurchaseConv = " & txtVolumeUndecisionedPurchaseConv.Text & "," & _
                 "TurnTimePurchaseDocClosing = " & txtTurnTimePurchaseDocClosing.Text & "," & _
                 "TurnTimePurchaseFunding = " & txtTurntimePurchaseFunding.Text & "," & _
                 "" & _
                 "TurnTimeRefiGov = " & txtTurnTimeRefiGov.Text & "," & _
                 "VolumeUndecisionedRefiGov = " & txtVolumeUndecisionedRefiGov.Text & "," & _
                 "TurnTimeRefiConv = " & txtTurnTimeRefiConv.Text & "," & _
                 "VolumeUndecisionedRefiConv = " & txtVolumeUndecisionedRefiConv.Text & "," & _
                 "TurnTimeRefiDocClosing = " & txtTurnTimeRefiDocClosing.Text & "," & _
                 "TurnTimeRefiFunding = " & txtTurntimeRefiFunding.Text & "," & _
                 "" & _
                 "DatelastModified = " & lb(Now()) & "," & _
                 "LastUpdateBy = " & sq(strLANID) & _
                 " WHERE DeliverySite = " & sq(cboSelectDeliverySite.Text) & " AND ReportDate = " & lb(txtReportDate.Text)
        Dim myCommand As New OleDb.OleDbCommand(strSQL, conn)
        myCommand.ExecuteNonQuery()
    End Sub

    Public Sub AppendDetails()
        Dim strSQL As String
        strSQL = "Insert into tblMasterInputData VALUES (" & _
                  sq(cboSelectDeliverySite.Text) & "," & _
                  lb(txtReportDate.Text) & "," & _
                  txtVolumeReceived.Text & "," & _
                  txtVolumeReceivedSIMO.Text & "," & _
                  txtVolumeReceived
 
One other thing: are we SURE that moving to SQL Server will fix the problem? Can I get verification that at the default level of security for the .Net 1.1 Framework allows this? I'd hate to spend a day rewriting this (it would be less for a more experienced .Net programmer I'm sure but I'm going to have to fumble through) and migrate the whole database to encounter the same issue.
 
You could test it with a "quickie" app that just connects to the server, rads some data and disconnects.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
I tried the "quickie application" route. I tried connecting to one of our existing SQL Servers and received the exact same security exception. I had this code:

Code:
        Dim conn As New SqlClient.SqlConnection("Data Source = D3HTT321; Initial Catalog = d_alt_lending")
        conn.Open()

and received the error on the line conn.Open()

Anything else?

Thank you all for still trying to help me on this!
 
I think the change to SQL Server is a bit of a red herring here. Executables held on network drives acquire by default the permissions of the Intranet role. This blocks most access to the registry as well as automatic access to the local file system and security policy settings. The Access DB causes an error as it is likely trying to create an LDB file when a user connects to it. You need to adjust the .NET security to trust the assembly explicitly. I suggest you read Part 7 of the link that jebenson mentioned in his first reply, which will make a deployment package you can get the IT department to automatically deploy.
Alternatively, if you are using .NET 2005, look into using a web address or other network location to publish the app. The app can be set to automatically update itself from a central location while running from the user's hard disk, and you can also prevent older versions from executing.
 
Given this, mwardle, is there any way to rewrite the code to do the same thing in a way that would not alert the .NET security? Any other connection object or such that will fly "under the radar" so to speak?
 
How about, map a drive to the network share and use that drive letter in your connection string. That should get past the intranet security issue with out having to alter the computer greatly. And if need be, drive mappings can be created on the fly.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Rick,

Thanks for the suggestion. I tried it and a mapped network drive didn't fix the solution; the .NET framework still treated it as a network location.

 
Interesting. If that's the case I'm thinking it doesn't look good. Any driver connecting to an MDB is going to create the LDB file which will pop the .Net security. There are some options though. Converting the database to either SQL-Server (if you already have it), Microsoft's desktop database system (if your requirements are low enough), or an open source solution (MySQL for instance, if you are cheap and depending on your requirements).

If you still need the Access Database for an interface or reporting or something, you can update the tables to be link tables that pull data from the new database.

The only other way I can think of is to do like JB said and work with the .Net security.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Rick,

I tried the SQL Server option and still hit the same security issue, and it's not trying to pop an LDB file. I made a quick app which connects to our SQL Server (the code is above) and it bombed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top