Click here to Skip to main content
15,893,190 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: text box in VB application Pin
DaveAuld5-Mar-10 20:35
professionalDaveAuld5-Mar-10 20:35 
Questiondynamically writing text into word document using vb.net Pin
vijaylumar5-Mar-10 18:46
vijaylumar5-Mar-10 18:46 
AnswerRe: dynamically writing text into word document using vb.net Pin
Paramu19736-Mar-10 2:57
Paramu19736-Mar-10 2:57 
Questionstoring xml in database [solved] Pin
TremaHD5-Mar-10 5:53
TremaHD5-Mar-10 5:53 
AnswerRe: storing xml in database Pin
Dave Kreskowiak5-Mar-10 7:34
mveDave Kreskowiak5-Mar-10 7:34 
GeneralRe: storing xml in database Pin
TremaHD5-Mar-10 9:41
TremaHD5-Mar-10 9:41 
GeneralRe: storing xml in database Pin
Dave Kreskowiak5-Mar-10 12:00
mveDave Kreskowiak5-Mar-10 12:00 
GeneralRe: storing xml in database Pin
TremaHD6-Mar-10 4:27
TremaHD6-Mar-10 4:27 
Actually I don't have my code on hand, but the code look like this:
Dim ms As IO.MemoryStream = New MemoryStream()
        Dim w As XmlTextWriter = New XmlTextWriter(ms, Encoding.UTF8)
        w.WriteStartDocument()
        ' create the xml doc by adding element, attribut etc...
        w.WriteEndDocument()
        w.Flush()
        ms.Position = 0
        Dim sr As StreamReader = New StreamReader(ms)
        Dim strXML As String = sr.ReadToEnd()

Now I have a string that have my xml doc, but because the string type is UTF-16, I need to convert in UTF-8. I can create an array of bytes with the correct encoding like this:
Dim enc As New System.Text.UTF8Encoding()
      Dim dBytes As Byte() = enc.GetBytes(strOutput)

I now have an array of byte with the proper encoding but how can I save that in the database where the field is of type ntext?
GeneralRe: storing xml in database Pin
Dave Kreskowiak6-Mar-10 18:03
mveDave Kreskowiak6-Mar-10 18:03 
GeneralRe: storing xml in database Pin
TremaHD7-Mar-10 5:09
TremaHD7-Mar-10 5:09 
GeneralRe: storing xml in database Pin
Dave Kreskowiak7-Mar-10 9:00
mveDave Kreskowiak7-Mar-10 9:00 
GeneralRe: storing xml in database Pin
TremaHD7-Mar-10 13:13
TremaHD7-Mar-10 13:13 
GeneralRe: storing xml in database Pin
Dave Kreskowiak7-Mar-10 17:17
mveDave Kreskowiak7-Mar-10 17:17 
GeneralRe: storing xml in database Pin
TremaHD9-Mar-10 14:13
TremaHD9-Mar-10 14:13 
AnswerRe: storing xml in database Pin
Luc Pattyn6-Mar-10 5:21
sitebuilderLuc Pattyn6-Mar-10 5:21 
Question[VB.NET/2.0] Clicking ok or cancel on MessageBox with other application using TCPListener Pin
SiXke5-Mar-10 1:20
SiXke5-Mar-10 1:20 
AnswerRe: [VB.NET/2.0] Clicking ok or cancel on MessageBox with other application using TCPListener Pin
Dave Kreskowiak5-Mar-10 2:18
mveDave Kreskowiak5-Mar-10 2:18 
QuestionWill an Excel 2007 application work in Excel 2003 Pin
KLangkilde4-Mar-10 23:36
KLangkilde4-Mar-10 23:36 
AnswerRe: Will an Excel 2007 application work in Excel 2003 Pin
Thomas Krojer5-Mar-10 2:53
Thomas Krojer5-Mar-10 2:53 
AnswerIncompatible file formats Pin
David Mujica5-Mar-10 3:13
David Mujica5-Mar-10 3:13 
AnswerRe: Will an Excel 2007 application work in Excel 2003 Pin
Dave Kreskowiak5-Mar-10 3:15
mveDave Kreskowiak5-Mar-10 3:15 
QuestionDynamicaly make a pop up menu item visible. Pin
karthickmani634-Mar-10 18:33
karthickmani634-Mar-10 18:33 
AnswerRe: Dynamicaly make a pop up menu item visible. Pin
Wayne Gaylard4-Mar-10 19:35
professionalWayne Gaylard4-Mar-10 19:35 
GeneralRe: Dynamicaly make a pop up menu item visible. Pin
karthickmani634-Mar-10 22:50
karthickmani634-Mar-10 22:50 
GeneralRe: Dynamicaly make a pop up menu item visible. Pin
Wayne Gaylard4-Mar-10 23:35
professionalWayne Gaylard4-Mar-10 23:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.