15,897,518 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 13711215 (Top 25 by date)
Member 13711215
5-Dec-19 2:59am
View
Thank you
Member 13711215
16-Sep-19 6:14am
View
Thank you, my code:
Try
Using FileObject As New FileStream(filePath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, bufferSize)
Using StreamWriterObj As New StreamWriter(FileObject, Encoding.GetEncoding("Windows-1250"))
Using Reader As SqlDataReader = cmd.ExecuteReader()
Dim FieldCount As Integer = Reader.FieldCount - 1
StreamWriterObj.WriteLine(Reader.GetName(0) + ";" + Reader.GetName(1) + ";" + Reader.GetName(2) + ";" + Reader.GetName(3) + ";" + Reader.GetName(4) + ";" + Reader.GetName(5) + ";" + Reader.GetName(6) + ";" + Reader.GetName(7) + ";" + Reader.GetName(8) + ";" + Reader.GetName(9) + ";" + Reader.GetName(10) + ";" + Reader.GetName(11) + ";" + Reader.GetName(12) + ";" + Reader.GetName(13) + ";" + Reader.GetName(14) + ";" + Reader.GetName(15) + ";" + Reader.GetName(16) + ";" + Reader.GetName(17) + ";" + Reader.GetName(18) + ";" + Reader.GetName(19) + ";" + Reader.GetName(20) + ";" + Reader.GetName(21) + ";" + Reader.GetName(22) + ";" + Reader.GetName(23) + ";" + Reader.GetName(24) + ";" + Reader.GetName(25) + ";" + Reader.GetName(26) + ";" + Reader.GetName(27) + ";" + Reader.GetName(28) + ";")
Do While Reader.Read()
StreamWriterObj.Write(Reader.Item(0))
For i As Integer = 0 To FieldCount - 1
StreamWriterObj.Write(Delimiter)
StreamWriterObj.Write(Reader.Item(i))
Next
StreamWriterObj.WriteLine()
Loop
End Using
End Using
End Using
'MessageBox.Show("Export done successfully!")
Catch ex As Exception
mail(sender, e)
MessageBox.Show(ex.Message, "Warning", MessageBoxButtons.OK)
End Try
Member 13711215
13-Sep-19 12:57pm
View
And how can I write headers?
Member 13711215
29-May-19 3:58am
View
first problem is my language. Im from Czech Republic and we use special char e.g. Ž,Š,Č. Export from datagrid to csv look like, e.g. Životná is exported as Životná. Can you help me with this problem? File.WriteAllBytes(filePath, Encoding.Unicode.GetBytes(sb.ToString)).
The main problem is that i don't know how to convert csv to xls.
How do I get started correctly to make the transfer including these characters?
Member 13711215
22-Feb-19 4:00am
View
Hi, yes, the file was searched, the size matches, and the path to upload is also there. I edit DownloaddataCompleted to DownloadstringCompleted
Member 13711215
19-Feb-19 3:52am
View
sorry I update it
Member 13711215
8-Feb-19 2:54am
View
In textbox1 is text =00990202. I want merge byte row "bytesToSend" with textbox1 text to one row and send this row via clientsocket. Bytetosend + textbox1 and send this full row.
Member 13711215
8-Feb-19 2:20am
View
Sorry, I try to merge byte[] bytes = Encoding.ASCII.GetBytes(s);
and
byte[] bytesToSend = new byte[7] { 0x01, 0x46, 0x4d, 0x42, 0x2d, 0x2d, 0x2d };
Member 13711215
7-Feb-19 11:21am
View
Griff? Can you help me? How can I send to printer this command? <soh> FBC---r--------<etb>
Member 13711215
7-Feb-19 2:44am
View
@sahabiswarup - can you help me? I try to send command to thermal valentine printer Vario III.
Member 13711215
6-Feb-19 11:39am
View
Hi, I improve my question. Now when I send this file, printer show me error. communication is OK. but now I want select file from printers memory card by name and print it. in printer is way A:\STANDARD\some file.
Member 13711215
6-Feb-19 11:19am
View
I have arduino code if it helps.
Member 13711215
29-Jan-19 4:04am
View
I update it
Member 13711215
22-Jan-19 6:20am
View
Thank you
Member 13711215
15-Jan-19 5:41am
View
thank you
Member 13711215
15-Jan-19 4:32am
View
How can I write result to label?
Member 13711215
4-May-18 5:10am
View
Thank you ;)
Member 13711215
4-May-18 4:16am
View
I edit it:
regcis is textbox1.text
and I replace & to andalso
Dim a As String = "010.551" Or "008.880" Or "008.881" Or "009.701" Or "009.706" Or "009.925" Or "011.149" Or "011.150" Or "009.648"
Dim b As String = "5"
If regCis.StartsWith(a) AndAlso regCis.EndsWith(b) Then
Member 13711215
4-May-18 4:12am
View
ERROR: Conversion string to long is not valid
Member 13711215
18-Apr-18 0:58am
View
Hi, not function.
Member 13711215
18-Apr-18 0:57am
View
this is floating point
Member 13711215
17-Apr-18 6:54am
View
Hi, I do in VB.NET can you help me with implementation to my code?
Member 13711215
20-Mar-18 7:42am
View
yes this is existing application. I dont have a source code.
Member 13711215
6-Mar-18 6:52am
View
I would like to scan a barcode to textbox1 eg: 00964801000025 and this barcode find in text file aaa.txt and delete line where was this barcode found.
Member 13711215
6-Mar-18 5:45am
View
Ok, thank you for fix, but I still cant remove a line and. Nothing happen.
Public Sub button2_click(sender As Object, e As EventArgs) Handles Button2.Click
Dim sb As New System.Text.StringBuilder
For Each line In IO.File.ReadLines("C:\_Montix a.s. - cloud\iMontix\aaa.txt")
If (line.StartsWith(TextBox1.Text)) Then
sb.Append(line) ' add lines that are not in the textbox
End If
Next
End Sub
Show More