User Profile

Collapse

Profile Sidebar

Collapse
LeoVBNET
LeoVBNET
Last Activity: May 9 '16, 12:15 AM
Joined: Apr 9 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks Madankarmukta
    Finally I solved this issue. All the problem was one of the controls binds to BindingSource: "PictureBox "
    Don't ask me why but this control made BS.EndEdit() to 'makes changes' over the DataTable, so when I look up for changes, it always says it had changes.

    So, I did this:
    PictureBOX.Data Bindings.Add("I mage", BS, "LOGO", True, DataSourceUpdat eMode.Never)
    ...
    See more | Go to post

    Leave a comment:


  • VB BindingSource.EndEdit() and DataTable.GetChanges()

    Hello
    I have some controls (textboxs,picbo x,checkbox) bind to a BindingSource. And this BindingSource.D ataSource to a DataTable.

    I need to know if some field has been modified in order to ask for save changes.

    The problem is that when I use BindingSource.E ndEdit(), the DataTable.GetCh anges() always return TRUE even if none of the controls has been modified.

    Any idea of what I'm doing wrong?
    ...
    See more | Go to post

  • LeoVBNET
    replied to Entity Framwork repeats the same results
    in .NET
    Hi
    The mystery has been solved:

    EF caches the database. So, it is very important to make a context when needed and then dispose it.

    Code:
    Using DBEntity As New DBEntityModel()
       ....
        ....
    End Using
    Thanks!
    See more | Go to post

    Leave a comment:


  • LeoVBNET
    started a topic Entity Framwork repeats the same results
    in .NET

    Entity Framwork repeats the same results

    Hi
    I have used Linq to SQL for a long time, but now, because I need to work with MySQL I had to start with Entity FrameWork.
    I combine ADO.NET and EF and I did not realize about this issue, but recently, I had found a very big problem that it`s driving me crazy.

    A simple query...

    Dim Query = (From p in db.products select p).ToList

    It gives the results the first time good, but when I run this...
    See more | Go to post

  • LeoVBNET
    started a topic LocalDB deploy issue
    in .NET

    LocalDB deploy issue

    Hello

    Working on a VB.NET project with SQL LocalDB I'm having the next problem:

    When deployng on a client machine (Windows 7), my application tries to Create a DB on disk but it got ERROR 5 (Access denied) ... (It seems SQLLocalDB does not have write permissions on disk)

    It suppose I have not chance to manipulate that machine. I just send a SETUP that contains the program and SQLLocalDB as prerequisite....
    See more | Go to post

  • LeoVBNET
    started a topic How to deploy a project with SQL?

    How to deploy a project with SQL?

    I'm working on WinForms Project in VB2013 with Localdb SQL database (localdb)\v12.0 ).
    In this project I`ve been using "Management Studio" and both ADO.NET and Linq to SQL.

    How to suppose to deploy it?

    It is better to include DB into the Setup or I should to create the entire DB by code or what should I do?

    Thanks.
    See more | Go to post

  • Is it possible to convert an Object Type into another?

    Hi
    I'm trying to do this:

    Code:
    Dim MyForm As New Object
    
       or
    
    Dim MyForm As System.Windows.Forms.Form
    
    Select Case Form.Activeform.Name
      Case My.Forms.Form1.Name
         MyForm = My.Forms.Form1
      Case My Forms.Form2.Name
         MyForm = My.Forms.Form2
    End Select
    The problem comes because MyForm is still an Object or Form type....
    See more | Go to post

  • LeoVBNET
    started a topic Forms access null exception.

    Forms access null exception.

    Hi
    This is stranged:

    This first scenario works good!!!
    =============== =============== ====
    FORM1
    F3 AS NEW FORM3
    F3.SHOWDIALOG()

    FRIEND SUB METHOD()
    F3.BACKCOLOR = AQUA <----- (WORKS FINE)
    END SUB
    =============== =============== =====
    FORM3
    FORM1.METHOD()
    =============== =============== =====

    This second scenario DOES NOT work...
    See more | Go to post

  • How to convert Access 2013 DB into SQL COMPACT

    Hi
    Because VS 2013 dropped SQL COMPACT databases, I need to convert Access 2013 databases into SQL COMPACT in order to be able to use Linq to SQL in VB 2013.

    Anybody can help me?

    Thanks
    See more | Go to post

  • LeoVBNET
    started a topic Automatic DataGridView "refresh"?

    Automatic DataGridView "refresh"?

    Hi
    In Form1 I have a Datagridview showing the content of a table from DataBase.

    In Form2 I add or modify a row in that table. So, when I get back to Form1 I would want the DataGridView get updated automatically.

    To populate the DGV I use a Linq To Sql query:
    Code:
    Dim Query = From .....
    Me.DGV.DataSource = Query
    or

    Code:
    Dim Query = From .....
    Me.BindingSource1.DataSource
    ...
    See more | Go to post

  • How to query common values in Linq to SQL?

    We have two tables PRODUCTS and CATEGORIES, both of them have a many-to-many relationship through a third table --> CATE_PRODUCTS

    My question: given 1 or more ID_PRODUCT I need to retrieve all the COMMON Categories that belongs to those Products.

    Example: Given 3 Products IDs:

    PRODUCTS ---------- CATEGORIES of each one
    -----------------------------------------------------
    COKE ------------>...
    See more | Go to post

  • In fact, I did try DoEvent but it was the same problem. Definitively, I gonna have to change the way I'm trying to do it.

    Thanks again for your support.
    See more | Go to post

    Leave a comment:


  • It's ok when buttons is used. But that's not the idea.
    If you want you can download a simple example I made in the next link:

    http://leoweb.hol.es/VB/

    'Threarding_1.z ip'

    It is a very simple example, but it has the principal idea.

    When user click on either button or changes radiobuttons, both ListView should stop their work and restart again from the begining....
    See more | Go to post

    Leave a comment:


  • jeje... I appreciate all your good intention. Really I do. But, my friend, that´s not the solution.

    When user changes a radiobutton option or wants to go to another place inside application, he should not wait for ListView loading. Besides, if user make two, three or more changes (clicks, etc), all of them are placed inside memory waiting to act. It is like when a program does not respond and suddenly every click you did appers one...
    See more | Go to post

    Leave a comment:


  • Ok. I will try to be clear.
    See the code below:

    Code:
    Form_List
      -ListView
      Public Sub Fill_ListView()
        (every code to fill the ListView)
         Linq
         ImageList --> Module1.FindImage(Image As Bitmap)
         ListViewItem
         etc.
    
    ---------------------
    
    Form_PPAL
      Private MyList_1 As Form_List
      Private MyList_2 As Form_List
    
      Me.MyList_1.Fill_ListView
    ...
    See more | Go to post

    Leave a comment:


  • Thanks Mihail but it does not work propertly. I used a boolean 'StopRun' and when it is applied from a button or from another independent method works, but remember I need to stop and restart the thread from the same method.
    Basically, I did StopRun on True, then sleep some milisecs and then StopRun on False and call the thread again. But the called method does not start from the begining or it just does not stop until finish.

    ...
    See more | Go to post

    Leave a comment:


  • LeoVBNET
    started a topic How to Stop and Restart a BackGroundWorker

    How to Stop and Restart a BackGroundWorker

    Hi. I'm working on a project in which use a BackGroundWorke r control between two forms.

    I need to Cancel and immediately to restart the BackGroundorker from the same event. The problem is that: when BackGroundWorke r.CancelAsync() , apparently the thread does not cancel and when it gets to BackGroundWorke r.RunWorkerAsyn c(), the exception "BackgroundWork er is busy" is thrown.

    So, how can I cancel and restart the...
    See more | Go to post

  • How to pass a variable by reference to a Form

    Hi. I make an instance of a form 'B' from Form 'A'. But I need to pass two variables by reference.
    I do what you can see below:

    Code:
    FORM 'B'
    Private Val1 As Uintenger
    Private Val2 As Boolean
    Public Sub New(ByRef _Val1 As Uinteger, ByRef _Val2 As Boolean)
    InitializeComponent()
      Val1 = _Val1
      Val2 = _Val2
    End Sub
    
    Private Sub Proceso()
      Val1 = 333
    ...
    See more | Go to post
    Last edited by Rabbit; Jul 9 '13, 03:33 PM. Reason: Fixed code tags

  • LeoVBNET
    replied to How to Identify a unique file
    Finding information on the web I got the DSOFile assembly. It allows me to read and write extended file properties such as Comments, Category, Author, etc.
    What I do is to put an ID inside on one of this properties, and the same time this ID is the "Key" of a Hashtable Collection where I save all the information about that file.
    This assembly allows me to work with files even when these files are being used by another app....
    See more | Go to post

    Leave a comment:


  • LeoVBNET
    replied to How to Identify a unique file
    Thanks Rabbit, but you have any idea on how it could be done? (shell32 or so?)
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...