User Profile

Collapse

Profile Sidebar

Collapse
qfchen
qfchen
Last Activity: Aug 11 '11, 02:50 AM
Joined: Oct 29 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • qfchen
    started a topic How to find network device using UDP?
    in .NET

    How to find network device using UDP?

    I have following codes to find my network device. It's working fine in windowXP, but in window 7, I don't get response using socket.poll(). what could be the problem?


    Code:
    Imports System
    Imports System.Net
    Imports System.Net.sockets
    Public Class CNetScan
        Public ipCnt As Integer = 0
        Public ipString(300) As String
        Public buf(2048) As Byte
        Public Sub NetScan()
    ...
    See more | Go to post

  • qfchen
    started a topic How to search network for device?

    How to search network for device?

    I have a network device on the local area network, it gets the IP address dynamically, how can I find it and get its IP address in VB.NET code? I only know its mac address is like 08-24-B0-01-XX-XX, the first 4 byte is fixed. Any way to get its IP by finding the MAC first? or any other ways? Thanks
    See more | Go to post

  • qfchen
    started a topic modbus TCP for VB.Net

    modbus TCP for VB.Net

    Hi,

    I need to implement modbus over TCP in VB.net, Is there any library or component which can be used in VB.net?
    See more | Go to post

  • qfchen
    started a topic open SQL Server browser

    open SQL Server browser

    Hi

    I need to select a backup file (.bak) to restore the database. How can I open a browser window of SQL server, so user can browse and choose the right backup file.

    Thanks
    See more | Go to post

  • qfchen
    started a topic access to backup database

    access to backup database

    Hi,

    I have an application to backup SQL server database every week, but I still need to query data from those backed up database, How shall I do it? Thanks.
    See more | Go to post

  • thank you very much, the codes works in VB as well. have a good day.
    See more | Go to post

    Leave a comment:


  • Thank you very much.
    Yes, I did try the statement in SQL server management studio, It works.
    But how can I find the result in vb.net after execute the SQL statement? below is my code in VB
    Code:
    Dim Cnt As Integer
            Dim tmpStr As String
            Dim sqlCmd As New SqlClient.SqlCommand("select * from INFORMATION_SCHEMA.tables where table_name like '%E8%'", Me.myConnection)
            sqlCmd.CommandTimeout
    ...
    See more | Go to post

    Leave a comment:


  • select * from INFORMATION_SCH EMA.tables
    above statement, How can I get the list of tables name? where the table names are returned to?
    See more | Go to post

    Leave a comment:


  • but the table name is link to some serial number, such as E80001, the other application only knows the name start with E8, is there any way to get the list of table name, then filter out those start with E8?
    See more | Go to post

    Leave a comment:


  • get list of tables' names in SQL server database

    Hi,

    I have one application create tables in database dynamically during run. Another application need to find all these tables' name in the database. how should in do in vb.net?
    See more | Go to post

  • qfchen
    replied to shrink SQL database in VB.net
    thank you very much, it works. the actual commands are:

    Code:
    Dim CmdDeleteRT As New SqlClient.SqlCommand("DELETE from EM_AWARE_RT", myConnection)
            CmdDeleteRT.CommandTimeout = 1800
    
            Dim CmdShrink As New SqlCommand("DBCC SHRINKDATABASE(EM_AWARE)", Me.myConnection)
            CmdShrink.CommandTimeout = 1800
    See more | Go to post

    Leave a comment:


  • qfchen
    started a topic shrink SQL database in VB.net

    shrink SQL database in VB.net

    Hi

    I need to backup sql database, below is my VB code to do backup, shrink and delete. But I have problem to shrink the database. Need your help to find what's wrong for the shrink potion. the error happened when execute CmdShrink.Execu teNonQuery(). thanks

    Code:
    Dim Cnt As Integer
            Dim CmdBackup As New SqlClient.SqlCommand("backup database EM_AWARE to disk= 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\EMAwareBackup.bak'",
    ...
    See more | Go to post

  • qfchen
    replied to SQL query time out
    yes, the sql connection open all the time.
    See more | Go to post

    Leave a comment:


  • qfchen
    started a topic GZipStream size

    GZipStream size

    Hi,

    I'm using GZipStream to comopress a database, before compress the database size is about 300K, but after compress, it become 600K. Why it gets bigger size after compress? below are the code.
    Code:
    Dim ZipFileName As String = Nothing
                    ZipFileName = DBbackup.Substring(0, DBbackup.LastIndexOf("\") + 1) & FileName
    
                    Dim srcFile As FileStream = File.OpenRead(ZipFileName)
    ...
    See more | Go to post

  • qfchen
    started a topic SQL query time out

    SQL query time out

    Hi,

    I had one problem when query in VB.net. It fails at first time after SQL server restart, the fail message is "timeout expired". The same query success in second time onward, How can I set timeout in VB dataSet property? I use DataSet to communicate with database. Below is the query statement I used in FillBy() function.
    Code:
    cnt = Me.EM_AWARE_20kV2TableAdapter.FillByTOP_EndDT(Me.DataSet_ESD2.EM_AWARE_20kV, samples,
    ...
    See more | Go to post

  • qfchen
    started a topic SQL server query timeout

    SQL server query timeout

    Hi,

    I had one problem when query in VB.net. It fails at first time right after SQL server restart, the fail message is "timeout expired". The second time onward, the same query success, what can I do in SQL server setup?
    See more | Go to post

  • qfchen
    started a topic Query to SQL server slow

    Query to SQL server slow

    I had tried to use SQL statement to retrieve data record from SQL server, but when the database grow, the query speed getting slower. I just want to get most recent 5 records, any way to make it fast? Below is the SQL

    SELECT Top (5) EventNumber, IP, DateTime, DateTimeStamp, EsdMaxLog, EsdMaxLin, EsdMaxAbs, EsdCntAll, EsdCntLast, SvMax, SvCurrent, EsdLimLog, EsdLimLin,
    EsdLimAbs, Distance, SvRange,...
    See more | Go to post

  • qfchen
    started a topic query SQL data slow

    query SQL data slow

    I had tried to use SQL statement to retrieve data record from SQL server, but when the database grow, the query speed getting slower. I just want to get most recent 5 records, any way to make it fast? Below is the SQL

    SELECT Top (5) EventNumber, IP, DateTime, DateTimeStamp, EsdMaxLog, EsdMaxLin, EsdMaxAbs, EsdCntAll, EsdCntLast, SvMax, SvCurrent, EsdLimLog, EsdLimLin,
    EsdLimAbs, Distance, SvRange,...
    See more | Go to post

  • qfchen
    replied to draw a wave in VB.net panel
    any idea how to resolve the blinking issue when draw waveform in paint event?
    See more | Go to post

    Leave a comment:


  • qfchen
    replied to save data to excel file
    it's resolved by adding a COM module of 'Microsoft Excel'
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...