|
what is the best and fast way to import and export data from a flat file to a database in dot net with sql server 2005. Should we have to write our own code or is there any service to do this. [other than using DTS (SQL 2000 only) / SSIS ]. Kindly copy some reference URL.
________________
IMQ
We can have facts without thinking but we cannot have thinking without facts.
****************
|
|
|
|
|
Depending on the format of the flat file you could set up a Bulk load query in SQL.
|
|
|
|
|
Hi (:
Im currently developing an application in C# that requires chat/support discussion features.
I have all of the back-end networking sorted out, But im stuck when it comes to the UI. . .
I cant find a nice and efficient method for displaying the chat session/logs to the users.
Ive tried using just a textbox.. but it looks primitive, Ive tried using Chat Controls i have found online, but they wouldn't work. . . and i have tried using HTML rendering controls from here on CP, but when the message stack builds up the rendering slows the whole UI.
Could someone, maybe who has tackled a similar situation, offer some advice as to how i could go about both professionally and efficiently displaying chat sessions in my UI?
Thanks for your time in reading,
Andy.
modified on Saturday, April 18, 2009 8:53 PM
|
|
|
|
|
hi,
i have a question i want to put a search string in eax.it's now like this
mov dword ptr [eax],002A2E2Ah this is *.* but i want to put something like this *.asm in it to search for, but i can't get it to work.
thanks
|
|
|
|
|
Hi, I have a question too: What has your question to do with this forum?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I want to be able to put an entry in my app.config so that, regardless of the user running the app, it will still point to their "My Documents" folder. The user's PCs are very locked down, and all they have access to is that folder, but obviously that folder is in a different location on every PC. Is there a way to use an environment variable or something, so that it always points at "My Documents" for the current user, wherever that is?
|
|
|
|
|
<blockquote class="FQ"><div class="FQA">orinoco77 wrote:</div>Is there a way to use an environment variable or something, so that it always points at "My Documents" for the current user</blockquote>
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hmm... not what I was actually after, but much better in fact. That will work nicely. Thank you.
|
|
|
|
|
It's the "proper" way.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
and it does in fact work a treat. One for the file, I think.
|
|
|
|
|
Hi every body
I am a junior in programming by C#.net now i need your help about how i can find some codes for my Simple project (Certificate of appreciation ) .
Terms of the draft on the third point on how to write the image and HowI saw the picture after writing on it .How do I stored or printed .
I thank you all in advance.
|
|
|
|
|
Is Google broken where you are?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
oh I need help and I know my English is So So.
Please Helpe me "How I can write on Pictur " Use C# .
Thanks again .
|
|
|
|
|
By manipulating the graphics. I suggest you try this tutorial [^]from the Coding4Fun website. It'll roughly take three hours
Enjoy!
I are troll
|
|
|
|
|
thanks. But I need Code C# to Edit Picture.
thanks a Lot.
|
|
|
|
|
The article explains how to "write text" on a "picture", using C#. I suggest you read it
I are troll
|
|
|
|
|
hi
How to copy some files from one folder to other with multithreading in visual C# or VB?
thx
|
|
|
|
|
Hi,
here is one approach:
1. get it working with a single thread;
2. devise a way to use more than one thread. Keep in mind that the performance bottleneck will not be CPU power, but rather disk I/O and/or memory bus bandwidth.
|
|
|
|
|
Cross post^4
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I,m working on a project after searching the web I found a copy class that I have modified the code to meet my need,s when I,m done this will be a backup utility My copy class does a good job of coping file but for me there is one flaw I does not copy every file files that are locked or files in use by another process and it does not copy empty folders this is what I would like to do Is have my copy class copy all file and folers one paticular folder I would like to see it copy. Is all of the window\system32 and all its files. some one please help
Here is my copy class code:
Imports System.Threading
Imports System.IO
Imports System.Security.Permissions.FileIOPermissionAccess
Public Class CopyClass
'This will hold the reference to the client form
Private _clientApp As Form
'Create a delegate method that will map to the CopyThreadMessage method of the client app
Private Delegate Sub CallClientCopy(ByVal ThreadName As String, ByVal FilesRemaining As Long, ByVal Message As String)
'Create a delegate method that will map to the CountThreadMessage method of the client app
Private Delegate Sub CallClientCount(ByVal ThreadName As String, ByVal TotalFiles As Long, ByVal TotalFolders As Long, ByVal Files As Long, ByVal Message As String)
'Create an object for each deletegate
Private _callClientCopy As CallClientCopy
Private _callClientCount As CallClientCount
' Property variables
Private _firstTime As Boolean
Private _fromPath As String
Private _toPath As String
Private _directories As Long
Private _files As Long
Private _copiedFiles As Long
Private _totalFiles As Long
Private _fileName As String
' Constants
Private Const LOG_FILE As String = "BackupLog.txt"
Public Sub New(ByRef ClientApp As Backup)
' Save the reference to the client app
_clientApp = ClientApp
' Assign delegate objects
_callClientCopy = AddressOf ClientApp.CopyThreadMessage
'_callClientCopy = AddressOf ClientApp.CopyThreadMessage
_callClientCount = AddressOf ClientApp.CountThreadMessage
End Sub
Public Sub CopyFiles()
'Do the work of the first thread here
' Give this thread a name
If Thread.CurrentThread.Name = Nothing Then Thread.CurrentThread.Name = "Copy"
' Create a new DirectoryInfo object for from path.
Dim dir As New DirectoryInfo(FromPath)
' Call the GetFileSystemInfos method.
Dim FSinfo As FileSystemInfo() = dir.GetFileSystemInfos
'Copy one file at a time looping until all files are copied
ReallyCopyFiles(FSinfo)
'Call client one last time to signal end of copy
CallClient(Thread.CurrentThread.Name, _copiedFiles, _totalFiles, _directories, "END")
End Sub
Public Sub GetCountData()
'Do the work of the second thread here
' Give this thread a name
If Thread.CurrentThread.Name = Nothing Then Thread.CurrentThread.Name = "Count"
' Create a new DirectoryInfo object for from path.
Dim dir As New DirectoryInfo(FromPath)
' Call the GetFileSystemInfos method.
Dim FSinfo As FileSystemInfo() = dir.GetFileSystemInfos
' Count folder and files
CountFiles(FSinfo)
' Save total files count
_totalFiles = _files
' Send message to client form
CallClient(Thread.CurrentThread.Name, _files, _totalFiles, _directories, "END")
End Sub
Private Sub ReallyCopyFiles(ByVal FSInfo As FileSystemInfo())
' Check the FSInfo parameter.
If FSInfo Is Nothing Then
Throw New ArgumentNullException("FSInfo")
End If
' Iterate through each item.
Dim i As FileSystemInfo
For Each i In FSInfo
Try
' Check to see if this is a DirectoryInfo object.
If TypeOf i Is DirectoryInfo Then
' Cast the object to a DirectoryInfo object.
Dim dInfo As DirectoryInfo = CType(i, DirectoryInfo)
' Iterate (recurse) through all sub-directories.
ReallyCopyFiles(dInfo.GetFileSystemInfos())
' Check to see if this is a FileInfo object.
ElseIf TypeOf i Is FileInfo Then
'save the full path and file name
_fileName = i.FullName
'Get the copy path name only
Dim copypath As String = ToPath & Mid(_fileName, Len(FromPath) + 1, Len(_fileName) - Len(FromPath) - Len(i.Name))
'Create copy path if it does not exist
If Not Directory.Exists(copypath) Then
Directory.CreateDirectory(copypath)
End If
' Get the to path and filename
Dim tofile As String = ToPath & Mid(_fileName, Len(FromPath) + 1)
' Update status info on client
Dim fi As New FileInfo(_fileName)
'Dim Message As String = _directories & fi.Name
Dim Message As String = fi.Name '& " is " & Decimal.Round(CDec(fi.Length / 1048576), 2) & "MB in length."
CallClient(Thread.CurrentThread.Name, _copiedFiles, _totalFiles, _directories, Message)
' if file exists check if file has been updated since last copy
Dim OkayToCopy As Boolean = True
If File.Exists(tofile) Then
If File.GetLastWriteTime(_fileName) = File.GetLastWriteTime(tofile) Then
OkayToCopy = False
End If
End If
' Copy file with overwrite
If OkayToCopy Then File.Copy(_fileName, tofile, True)
' Increment copied file count
_copiedFiles += 1
End If
Catch ex As Exception
' Report error but continue processing
WriteLog(ex.Message.ToString)
End Try
Next i
End Sub
Private Sub CountFiles(ByVal FSInfo As FileSystemInfo())
Static ShowCount As Long = 0
' Check the FSInfo parameter.
If FSInfo Is Nothing Then
Throw New ArgumentNullException("FSInfo")
End If
' Iterate through each item.
Dim i As FileSystemInfo
For Each i In FSInfo
Try
' Check to see if this is a DirectoryInfo object.
If TypeOf i Is DirectoryInfo Then
' Add one to the directory count.
_directories += 1
' Cast the object to a DirectoryInfo object.
Dim dInfo As DirectoryInfo = CType(i, DirectoryInfo)
' Iterate (recurse) through all sub-directories.
CountFiles(dInfo.GetFileSystemInfos())
' Check to see if this is a FileInfo object.
ElseIf TypeOf i Is FileInfo Then
' Add one to the file count.
_files += 1
'display count for first file in every folder then every 200 - for faster performance
Select Case ShowCount
Case 0
' Display count
CallClient(Thread.CurrentThread.Name, _files, _totalFiles, _directories, "")
Case Is >= 200
' Display count
CallClient(Thread.CurrentThread.Name, _files, _totalFiles, _directories, "")
'reset so display is every 200 files in folder
ShowCount = 0
End Select
'Increment show count
ShowCount += 1
End If
Catch ex As Exception
'Record error then continue (like a resume next)
WriteLog(ex.Message.ToString)
End Try
Next i
End Sub
Private Sub CallClient(ByVal ThreadName As String, ByVal Files As Long, ByVal TotalFiles As Long, ByVal Directories As Long, ByVal Message As String)
Select Case ThreadName
Case "Copy"
'Call the delegated method
_clientApp.Invoke(_callClientCopy, ThreadName, Files, Message)
Case "Count"
'Call the delegated method
_clientApp.Invoke(_callClientCount, ThreadName, Files, TotalFiles, Directories, Message)
End Select
'Let the thread sleep before continuing so the client app will have time to be process (1 millisecond is enough)
Thread.Sleep(0)
End Sub
Private Sub WriteLog(ByVal Message As String)
' Create log file
If Not File.Exists(LOG_FILE) Then
Using sw As StreamWriter = File.CreateText(LOG_FILE)
sw.WriteLine("BACKUP LOG FILE STARTED AT: " & DateTime.Now)
sw.WriteLine("================================================")
sw.WriteLine()
sw.Close()
End Using
End If
' Create an instance of StreamWriter to write text to a file.
Using sw As StreamWriter = New StreamWriter(LOG_FILE)
' Add some text to the file.
sw.WriteLine()
sw.WriteLine("TIME OF LOG ENTRY: " & DateTime.Now)
' Arbitrary objects can also be written to the file.
sw.WriteLine(Message)
sw.Close()
End Using
End Sub
Private Property FirstTime() As Boolean
Get
Return _firstTime
End Get
Set(ByVal value As Boolean)
_firstTime = value
End Set
End Property
Public Property FromPath() As String
Get
Return _fromPath
End Get
Set(ByVal value As String)
_fromPath = value
End Set
End Property
Public Property ToPath() As String
Get
Return _toPath
End Get
Set(ByVal value As String)
_toPath = value
End Set
End Property
Public ReadOnly Property Directories() As Long
Get
Return _directories
End Get
End Property
Public ReadOnly Property Files() As Long
Get
Return _files
End Get
End Property
Public ReadOnly Property TotalFiles() As Long
Get
Return _totalFiles
End Get
End Property
End Class
|
|
|
|
|
sorry Iam in the wrong forum Please fogive me
|
|
|
|
|
Hi,
I have Nikon coolpix s7c camera.I wrote a C# program using Windows Image Acquisition. In that program, when camera is connected to the computer, Program takes picture on Button events which I set up using the API WIA.dll.
When the camera is connected to the computer, the shutter release button is totally unresponsive.
I want to give the users both options for taking picture, either programmatically or physically. Programmatic way is working fine, but I don't know how to take picture from camera when it is connected to the computer. I have the respective camera driver installed.
Is there any way I can achieve this using digital camera?
Any help will be greately appreciated.
Veena
|
|
|
|
|
You're going to have to talk to Nikon Support about that one. But, using this as a small thought exercise, I doubt you can do it once the camera is connected to the machine.
|
|
|
|
|
Thanks Dave!!!
I did contact Nikon support. This feature is in D-SLRs. I downloaded the SDKs from NIkon.But
I did not find any working example in C#. If someone could send me a link to C# example, It will be a great help.
Veena
|
|
|
|
|
I've derived a PictureBox class to handle some drawing and mouse handling functionality. Now I'm trying to add some key press event handling, but the events never appear to be fired.
The OnMouseDown override was straightforward. Is the OnKeyDown for the PictureBox somehow different?
In the derived PictureBox constructor I set ControlStyles.Selectable to true, but that
didn't help.
As a test, I tried overriding ProcessKeyMessage, but that didn't appear to work either.
The derived PictureBox's parent form had an OnKeyDown event handler, but I commented that out to be sure it wasn't intervening, but that didn't make a difference.
Thanks for any help.
|
|
|
|
|