Windows application

Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Data.Odbc
Imports System.Data.Common.DbCommandBuilder
Public Class insert_update_delete
Public cn As OdbcConnection = Nothing
Private da As OdbcDataAdapter = Nothing
Private cb As OdbcCommandBuilder = Nothing
Private dt As DataTable = Nothing
Private bindingSource As BindingSource = Nothing
Private str As [String] = Nothing
Public i As String
Dim lst As New List(Of Class1)()
Private Sub binddata()
cn = New OdbcConnection("DSN=EDIXfer")
'Configuration.ConfigurationSettings.AppSettings("constr")
str = "SELECT * FROM ETAProcessSchedule"
da = New OdbcDataAdapter(str, cn)
cb = New OdbcCommandBuilder(da)
dt = New DataTable()
da.Fill(dt)
bindingSource = New BindingSource()
bindingSource.DataSource = dt
DataGridView1.DataSource = bindingSource
DataGridView1.Columns(3).ReadOnly = True
DataGridView1.Columns(4).ReadOnly = True
DataGridView1.Columns(5).ReadOnly = True
DataGridView1.Columns(6).ReadOnly = True
DataGridView1.Columns(7).ReadOnly = True
DataGridView1.Columns(8).ReadOnly = True
DataGridView1.Columns(10).ReadOnly = True
DataGridView1.Columns(11).ReadOnly = True
DataGridView1.Columns(12).ReadOnly = True
DataGridView1.Columns(13).ReadOnly = True
DataGridView1.Columns(14).ReadOnly = True
DataGridView1.Columns(15).ReadOnly = True
DataGridView1.Columns(16).ReadOnly = True
DataGridView1.Columns(17).ReadOnly = True
DataGridView1.Columns(18).ReadOnly = True
End Sub
Private Sub insert_update_delete_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DataGridView2.Visible = False
Button5.Visible = False
Button6.Visible = False
Button7.Visible = False
Button8.Visible = False
binddata()
End Sub
Dim ls As ArrayList = New ArrayList()
Dim ss As Integer = 0
Dim ss1 As Integer = 0
Dim ssp As Integer = 1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As Integer = MessageBox.Show("are u sure ? do you want to delete the recoed", "Record Delete ", MessageBoxButtons.YesNo)
If result = DialogResult.Yes Then
DataGridView1.Rows.RemoveAt(DataGridView1.CurrentRow.Index)
MessageBox.Show("Record Deleted from GUI Only")
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MessageBox.Show("Record Inserted Successfully IN GUI Only")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
da.Update(dt)
binddata()
MessageBox.Show("Record Updated Successfully In Database")
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Button1.Visible = False
Button2.Visible = False
Button3.Visible = False
Button4.Visible = False
DataGridView2.Visible = True
Button5.Visible = True
Button6.Visible = True
Button7.Visible = True
Button8.Visible = True
i = DataGridView1.CurrentRow.Cells(0).Value.ToString()
Dim sql As String = "select * from ProcessSchedule where EDIScheduleID='" + i + "'"
Dim adp As New OdbcDataAdapter(sql, cn)
Dim dt As DataTable = New System.Data.DataTable()
adp.Fill(dt)
Dim stp As String = dt.Rows(0)(21).ToString()
Dim stp1 As String() = stp.Split(" "c)
ls.Clear()
lst.Clear()
For x As Integer = 0 To stp1.Length - 1
ls.Add(stp1(x).ToString())
Next
For x As Integer = 0 To ls.Count - 1
Dim ssttt As String = ls(x).ToString()
Dim sssp As String() = ssttt.Split("="c)
For x1 As Integer = 1 To sssp.Length - 1
ss = 0
ss1 = ssp
Dim cs As New Class1() With { _
.VALUES = sssp(ss), _
.KEYS = sssp(x1).ToString() _
lst.Add(cs)
Next
Next
DataGridView2.DataSource = lst.ToList()
DataGridView2.Refresh()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim value As String = Nothing
Dim keys As String = Nothing
Dim query As String = Nothing
Dim str As String = Nothing
For i As Integer = 0 To DataGridView2.Rows.Count - 1
value = DataGridView2.Rows(i).Cells(0).Value.ToString()
keys = DataGridView2.Rows(i).Cells(1).Value.ToString()
Dim ss As String = value + "="c + keys
str += ss & Convert.ToString(" "c)
Next
query = "update ProcessSchedule set ProcParameters='" + str + "' where EDIScheduleID='" + i + "'"
da = New OdbcDataAdapter(query, cn)
dt = New DataTable()
da.Fill(dt)
MessageBox.Show("Data Updated In Database Successfully")
binddata()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
DataGridView2.Visible = False
Button5.Visible = False
Button6.Visible = False
Button1.Visible = True
Button2.Visible = True
Button3.Visible = True
Button4.Visible = True
Button7.Visible = False
Button8.Visible = False
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim ss As Integer = Convert.ToInt32(DataGridView2.CurrentCell.RowIndex)
lst.RemoveAt(ss)
DataGridView2.DataSource = lst.ToList()
DataGridView2.Refresh()
End Sub
Private Sub DataGridView2_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView2.CellContentClick
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Dim cs As New Class1() With {.VALUES = "", .KEYS = "".ToString()}
lst.Add(cs)
DataGridView2.DataSource = lst.ToList()
DataGridView2.Refresh()
End Sub
End ClassThis code is working fine with user dsn but in system dsn,data is not binding in grid view.kindly help me out

You have posted your question to a forum for Microsoft Project, a project management product.  Please check the list of forums:
https://social.msdn.microsoft.com/Forums/en-US/home
Click the view all link and select a more appropriate forum.

Similar Messages

  • Problem on using Crystal Report Viewer on windows application ("specified type is not valid ")

    Hi
    I am having problem on using Crystal Report Viewer on one of my windows application.
    I am not sure how to put the Crystal Report Viewer 11 Control onto the tool box.
    I could found a Crystal Report Viewer control on my computer, but it is version 8.5.
    I have also found another one which is Called Crytal ActiveX Report Viewer, i don't think it is the one I can use. As when I try to load a dummy report on to the Crytal ActiveX Report Viewer, It return an error. "specified type is not valid"
    Please see the Code sample below.
    private sub loadReport()
         Dim r as New ReportDocument
         'v is the name of the Crystal ActiveX Report Viewer Control
         r.Load("C:\Report1.rtp")
         v.ReportSource(r) <---It throw error on this line.
    End Sub
    Could you give me some advice about what have I done wrong, How to check if I have set up the Crystal Report Component correctly in my Visual Studio 2005 Standard edition.
    Thanks in advances.
    Many thanks
    Chi

    VS 2005 Standard and Express editions do not come with Crystal Reports; only the Professional and higher editions will have CR bundled. However, I believe you can purchase CR XI R2 Developer and it will give you the components you need to create a VS .NET 2005 application using the Standard edition.
    -MJ

  • Can Bootcamp and Parallels share the same Windows applications and data?

    I'm looking at getting an Intel iMac which will let me throw away my old PC - Yeah!
    I will have a couple of Win apps that I will need to hang on to (Quicken - Quicken for Mac is horrible, but that's another tghread). Anyway, can Bootcamp and Parallels share the same Windows applications and data?
    My thought would be to allow my wife to access Quicken from Parallels and not have to reboot. She will only need lightweight access and the overhead of running virtualization wouldn't impact her. I, on the other hand, would want to occasionally boot natively into Windows and run the same application with the same datafile. Is this possible?
    Thanks and looking forward to joining the MacIntel world!

    Thanks for all of the freplies. I suspected that BootCamp and Parallels could not shar ethe same partition, but wanted to verify. To address some of the other posts:
    Re: Quicken vs MoneyDance - I looked at MoneyDance a while back and while it is comparable to Quicken for Mac, it isn't comparable to Quicken for Windows (ergo, Quicken for Mac isn't comparable to Quicken for Windows!). But, as I said, that is a topic for another thread!
    Re: Using Bootcamp/Parallels for only one app: I actually have several apps that I still need access to on Windows. I work with many business applications than only run/are supported on Windows as well as receive some complex Office documents which Office for Mac cannot handle. Quicken (for Windows 2007) was just the best example of a consumer app where I could see wanting access from both OS X and Windows.

  • How can i close a windows application that works under vmware in am applescript

    Hi there,
    On my roof I have a set of solar panels. The daily score of these panels are only visible by using a Windows application.
    So I use vmware on my Imac to start Windows 7 on Bootcamp, this all by using a applescript in the automator app.
    In the script vmware is starting up and then i made a task in Windows that starts up the specific application after the Windows startup. After a delay of 180 seconds the script fills in a password an gives a return. That works well.
    Unfortunately it runs perfect the first tim a and then the second time, the specific application does not start. Only Windows starts up, the rest of the script does not work the right way, exempt closing the vmware, that goes as expected. So I think that the closing command that I give in the script:
    tell application "VMware Fusion"
    quit
    end tell
    causes a problem. The closing of the application within Windows is perhaps not done on a proper way.
    Therefore I am looking for a way to close that application first and then closing Windows 7 and then VMware.
    Thanks in advance for your help.

    As a completely different approach, I'd have a look at the raw network traffic with tcpdump or equivalent, and see if I could figure out how to access this data — if you're lucky, it's a fairly standard interface of some sort; HTML queries, possibly. 
    Start with a port scan of the controller for the panels (using Network Utility.app in OS X, or another tool), and see what IP ports are open and active.
    Is there a vendor and model associated with the controller for the panels?  That might turn up some software other than this Windows application/

  • Installing windows application with crystal reports runtime on 64 bit

    I have a windows application created on 32 bit windows xp platform using visual studio 2005 with oracle 10g as database and crystal reports XI as reporting tool. The platform on which the application was created has Oracle 10g 32 bit Client, Crystal Reports Developer XI R2 and Crystal Reports XI Server Client. The application has to be installed on 64 bit Windows 7 machine. The application fails with following error
    An error has occured while attempting to load the Crystal Reports runtime. Either the Crystal Reports registry key permissions are insufficient or Crystal Reports runtime is not installed correctly.
    Please install the appropriate Crystal Reports redistributable (CRRedist.msi) containing correct version of Crystal Reports runtime (x86, x64, or Itanium) is required. Please go to http://www.businessobjects.com/support for more information.*

    We have an Windows Forms apps developed in VB.NET 2005 using Reports Documents from Crystal Reports XI R2 Server. The application is running fine on 32 bit Windows XP machine. We are trying to install the application on 64 bit Win 7 machine. We are getting following error while doing so
    An error has occured while attempting to load the Crystal Reports runtime. Either the Crystal Reports registry key permissions are insufficient or Crystal Reports runtime is not installed correctly.
    Please install the appropriate Crystal Reports redistributable (CRRedist.msi) containing correct version of Crystal Reports runtime (x86, x64, or Itanium) is required. Please go to http://www.businessobjects.com/support for more information.*
    We have installed "Crystal reports XI R2 SP4 full build" and "SP6 incremental". We have also installed "CrystalReports11_5_NET.MSI from CR XI R2 FP 6.4 .NET Server Install" as well as "CRRedist2005_X64.msi".
    We are still getting the same error.

  • How can i install windows application (like hislider) on my macbook?

    Recently i'm  trying to create html slider plugin for my website. so i intall hislider software in my computer to create stunning image slider. This software is running ok, but i also like to install it on my MacBook.
    Can anyone shed any more light?

    There are presently several alternatives for running Windows on Intel Macs.
    1. Install Boot Camp 4 if you’re running 10.7 Lion http://www.apple.com/support/bootcamp/
    or Boot Camp 3 if you’re running 10.6 snow Leopard http://support.apple.com/kb/HT3777. Purchase Windows XP w/Service Pak2, Vista, or Windows 7.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    2. Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    3. VM Fusionand Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    4. CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    5. VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
      6. Last is Q.  Q is a freeware emulator that is compatible with Intel Macs.  It is much slower than the virtualization software, Parallels and VM Fusion.

  • Can I install Windows Applications on an External Drive?

    I would like to install Windows apps on an external drive. Is this possible?
    Windows Vista will of course reside on the internal drive. (on a 2009 Mac Mini)

    Is this possible?
    Only if the application is explicitly designated as being portable. It may work for other applications, but isn't guaranteed to succeed, as most Windows applications modify the registry when installed and/or use system components.
    (46573)

  • Display PDF document in Flex Windows application

    Hi,
    I am creating a flex windows application using action script and mxml script.I need help in displaying a PDF document in that windows application.I tried google search it is giving me some open source projects with IFrames.But,they can be only used for browser applications(web).So,anyone please suggest me how could i accomplish this task with winows application.
    Thanks,
    adi2010

    Hi Everyone,
    I got the solution for my issue.We need to use HTMLLoader to load the PDF documents in Windows aplication for Flex.

  • Best Practice for Showing Videos in a Windows Application

    I am building a windows 8 application that has multiple articles.  Each article will have anywhere from 0-3 videos associated with it.  I was wondering where I could find some guidelines, best practices or examples about the how best to do this
    from a design stand point, so that app is in line with the Windows Application guidelines.
    Any help would be appreciated!
    Thanks!

    Hi bcp1978,
    >>I was wondering where I could find some guidelines, best practices or examples about the how best to do this from a design stand point, so that app is in line with the Windows Application guidelines
    To design a windows app, we need to understand Microsoft design principles first:
    https://msdn.microsoft.com/library/windows/apps/hh781237.aspx Use these principles as you plan your app, and let them guide your design and development choices
    Microsoft also provide a page of design guideline:
    https://dev.windows.com/en-us/design
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Resolution 1440 x 900 for Windows applications?

    I am attempting to use MacBook Pro (15") to run Windows applications. Some of these are written for a screen resolution of 1280 x 1050, but the max available on the MBP is seemingly 1440 x 900. Is there any way around this, short of buying an external monitor or the 17" MBP?

    I was thinking of a solution along the lines of, maybe the device handlers could reduce the Windows app image to the lower native resolution, which could then be displayed.

  • Uploaded document via windows application does not show in document library, but as checked out Document

    Hi,
    A windows application uploads document to a document library programatically. Although they get added to the document library but are not shown there. Only when I go to the "Managed file that have no checked in verison" I see all the documents.
    This happens even though I have set "No Versioning" in the library settings. This is probably happening because I have added a few custom columns to the library.
    How can I avoid this situation and get to upload document which can directly be seen on the document library rather than first taking control of the doc and then checking it in?

    Hi,
    When uploading files without filling in some required columns, the files would appear in “Checked Out Files” page.
    To avoid this situation, you can modify that windows application to force users fill in the required columns or just define default values for those columns.
    You can take a look at the link below for more information:
    http://dlairman.wordpress.com/2013/03/13/favorite-sharepoint-feature-this-week-manage-files-which-have-no-checked-in-version/
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How to use original java VM in microsoft windows applications

    I have seen few applications like of Oracles, They use Java Beans and classes in the windows applications.
    Can any one of you tell me how can i use java classes in Windows applications(through oroginal java VM only, not by microsoft Java VM).

    actually i think they use the same way i use in my applications:
    i have Microsoft Visual C++ 6.0 by which i write a windows program interface (like oracle) then create from inside it, in reflection to a button event for example, a procedure which runs "javaw.exe -cp ... MyJavaProgram.class" this java program executes in its own work space and i can terminate it from within my C++ program, but i can't get data from within it directly, i use the DBMS as a way to get data from within it.
    but i'm not tried for example to run java bean directly in my VC++ program, emaple, not run swing component inside my VC++ main window Created by Visual C++
    that is what i'm doing. i hope there is a better way to do so because i don't like it that way i do.

  • Fillable PDF form in windows application

    Hi,
    I need to open a fillable PDF form from my windows application which I am developing in C# 2.0
    I added acropdf.dll from
    "C:\Program Files\Common Files\Adobe\Acrobat\ActiveX\acropdf.dll"
    but this is a reader and I want a fillable form to be opened.
    Can some one help as to how to go about it?
    thanks in advance,
    Kusuma

    Leonard,
    Thanks for your prompt reply.
    I am able to open a fillable form, but I have to disable the some of the menu options like save.
    I am not sure as to how to do this.
    I am using the Adobe activeX control, acropdf.dll.
    thank you,
    kusuma

  • How to determine which Windows application has focus

    I'm new to JAVA and new to programming. I hope someone will help me out. I'm trying to write a simple JLink program (JLink is a JAVA API for Pro|Engineer, a CAD design program). In part of this program I need to determine if Pro|E has focus. Is there some way to use JAVA to determine which actively running Windows application has focus?
    I basically want my program to pause when focus changes to another program. For example: While Pro|E is active and has focus the program runs, when I select an Excel window, or Outlook, or Notepad or any other window my program will pause until focus is returned. I just need to determine which window within Windows has focus.
    I hope I have explained this properly. I searched the internet for an answer but found nothing. I did come across some references to JNI, but I'm not sure what that is or how to use it.
    Thank you!

    I just need to determine which window within Windows has focus.No, you don't. All you need to determine is whether your application has the focus. If it doesn't, then some other application does, but it's really irrelevant which one does. All that's relevant is that your application doesn't have the focus and hence it should pause.

  • I'm trying to load photoshop elements 12 on my mac os x and when i click setup.exe i get :    You can't open the application "Setup.exe" because Microsoft Windows applications are not supported on OS X.

    i'm trying to load photoshop elements 12 on my mac os x and when i click setup.exe i get : You can’t open the application “Setup.exe” because Microsoft Windows applications are not supported on OS X.  The premiere elements 12 out of the same box loaded just fine.

    An .exe file means you have the windows version. Go get the mac version:
    Download Photoshop Elements products | 12, 11, 10
    but I hope you have a mac serial number.

  • Display PDF from flex windows application

    Hi,
    I am creating a flex windows application using action script and mxml script.I need help in displaying a PDF document in that windows application from a netwrok drive or local pc.I tried google search it is giving me some open source projects with IFrames.But,they can be only used for browser applications(web).So,anyone please suggest me how could i accomplish this task with winows application.
    Thanks,
    adi2010

    Hi ,
    The solution for the thread is
    <mx:HTML id="pdfHtml" location="test.html" width="100%" height="100%" />
    var pdfFile:File = File.applicationDirectory.resolvePath(pdfHtml.location);
        pdfFile = new File(pdfFile.nativePath);
        var fileURL:String = pdfFile.url;
        pdfHtml.location = fileURL;
    Thanks,
    adi2010.

Maybe you are looking for