Iam using VB.net to read an XML file in to SQL server. I am using VBs XML parser to read nodes, elements, etc. When an element's value contains a LE symbol and I insert the string in SQL, the resultant SQL record contains an Equal sign and not an LE.
I cannot examine the string for this character before inserting into SQL because I cannot find an ANSII equivalent. Normally I could find it with iPositiion = Instr("XML String", chr(??)). That does not work because there does not seem to be a number for the ?? that represents a LE. Someone suggested using 263 but that is a small o with a accent. iPosition = Instr("XML String", chr(263)) returns a -1, i.e. chr(263) was not found.
It turns out I wasn't checking the path that it was looking up, quite silly of me. Once I tracked that problem down and corrected the offending path, the reading worked just fine. Still baffled at the MSSQL issue, since the articles average less than 10 000 bytes.
Clarification:I am unsure if some of you are under the impression that the file I am trying to read is on my local machine. It resides on the web, on the same server as the script that is accessing it. Just in a different directory.
I wrote an online help desk application that includes articles. One problem I have run into is some of the articles are too long, and get truncated when I put them into my MSSQL database. I tried using TEXT and VARCHAR(MAX) as the data type, but it would still get truncated.So I decided that I would put the articles that are too long into a text file, and have my application read the text file from there. I got this code working in my development environment, but it does not work live:
[Code]...
At first, I thought it was because I did not change the /dev path prefix to /hlpdsk. But even after I changed it, it bombed out. What am I doing wrong?
how i read data from Sql server and write that in .csv file with vb.net , after that saving the .csv file with my own name and path? what must i do? for information data in sql like this one:
I have a txt file that I need to read into a listview, but I need to read from a specific line in that file. Below is a sample of the txt file to read,
I need to check the test result with the data from database, to find out which test result is failed. If there is a fail test result, I will show an alert to the operator and stop the checking process. Until the operator close the alert, then the checking process will continue from the last read point.
I have a number of word documents I am converting. Everything is going great until I get a file that is read only. In this case I get a Save As prompt.
Is there any way to open the file in read/write format? I should have admin privileges so access isn't an issue.
I'm using VB.net to open the files. More specifically
I've managed to put together some code to retrieve data from a sql file. I plan to connect to a sql server that are operated by a database program, that update the registry every 10 sec.
Before I try to connect my program to the sql database, I need to know if my program will prohibit other progrograms to read and write to the database.
My program: Imports System.Data.SqlClient Public Class Form1 Dim SQLRead As SqlDataReader
Reading a .txt file in VB.net. My file path is C:UsersMyLilMulePepeDocumentsVisual Studio 2008Projectscurtain_calls.txt.
This is my line of Dim LoanOptionsFile As String = "C:UsersMyLilMulePepeDocumentsVisual Studio 2008Projectscurtain_calls.txt"
I can read the file when I run the program, but how do I write the file path so that someone else can download my program and file and read the file on their system?
I'm trying to make a program that can read .mp3 data (Such as Artist, Album, Year, Track number, etc), but I need to be able to do two things that I have no clue how to do:
1. Read starting from a specified string (E.G, On one line it states: [code]
2. Read until a specified string (E.G, On the previously stated line,I need to read starting from what I said, up until.
I have an SQL database set up on my web server. Is it possible to read from a table in that database and display a value in a textbox, for example? I want to store valid values in a server database and then check the entered values in the application against the server values.
Been away from coding for almost 10 years, trying to get back into it but am a bit rusty. I have been asked to write a program that will allow users on a network to write hire data, driver data, job calander etc to a SQL database. The program works perfectly at the moment apart from one thing.
The program must allow the users to add an image to a drivers record to have on file, I have read loads of different forums, tutorials etc on how to do this and have managed to get my program to size the image properly and store it as binary data (i think) in the SQL database. I am now having problems doing the reverse and making the program read from the database and display the image in a picture box, the following is my code to save to the database
vb.net Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk Dim strm As System.IO.Stream
[Code]....
I understand that there may be easier ways to do this, this is simply the way I did this years ago, if any one can give me any pointers or any tips on how to read from the DB and display the image in a picturebox
how to read the registry and get all SQL server instances and databases installed and assign them to an array so I can then into the info into a datagridview?
I want to make something to read the text/strings sent to a server and maybe detect if the server is crashed or not and something to and some thing to send text/strings to a server maybe using winsock P.S. I also want to make something to crash my server.
I'm trying to get a single field back from the data. (I am searching by a primary key so I should get 0 or 1 answer). Please help. The table that I am querying has one entry with user = someone, input to several columns with the ans column having "a good answer"
Code: Dim reader As SqlDataReader Dim par As SqlParameter Dim result As String
I have a client/server application set up that the client sends a word file to the server and then the server converts that word file to a .TIF and sends the image back.The stuff I have now works.Say if I sent the size of the file and the actual file byte() to the server back to back, would the NetworkStream contain both back to back? This what I though would happen. So I implemented a kind of 'turn' based interaction during the duration of the conversion process.
I have developed a VB.NET program using a strongly typed dataset. This dataset has its connection to a SQL Server 2008 R2. The software should now be additionally used offline. The database should be exported to a *.sdf database. If no connection to the SQL server is produced, the software have to try to connect to the *.sdf database.I would like to achieve:
1. Export the data in the SQL Server 2008 R2 database to a local *.sdf file.
2. This *.sdf file has to work as an alternate connection string in the strongly typed dataset.
I have several programs that I wrote in Visual Basic.net 2003 that I run from a server at work. We upgraded to Visual Studio 2008 recently and I converted my code to that version. I rebuilt the .exes and tried to run it from the server. It said I needed to upgrade the framework on the server, which I did. Now when I run the .exe file from the server I get a runtime error:
Runtime Error! Program: d:... This application has requested the Runtime to terminate it in an unusual way. Please contact the applicaiton's support team for more information.
These programs are very important to the day-to-day operations of the company I work for. I did backup the software before converting it, so we're running normally right now, but there are modifications and upgrades I need to make as soon as possible, but cannot due to the programs crashing when I run the on the server.
how to work with XML.I need to create an multilingual application and need to save the controls captions in sql table with xml data typei started the following:[code]I know this is not very professional but thats all i did until know in SQLNow i have a problem in VB.NET i don't know how to read an xml data type (How to get the value from variables).If somebody can give me an exmaple how to read the xml than i would continue translating for each objects in the form where name is like the variable "btnLogin" and give it the controls.text property to the variables value.
I hate to ask this question on this forum, but I'm having a lot of trouble finding it on these online tutorials. Basically, I'm learning about SQL, VB.NET, and how to glue the two together, and I've learned about using SqlCommand.executeScalar() to get the first entry in a table. But that's all it's really good for, right? Or is there something more to the story here?
Basically, I'm wanting to ask about how to pull in a FULL table from a SQL database while using VB.NET, as well as how to pry substrings and stuff from it. Again I'm having to ask this on this forum because all these online tutorials seem to ignore the subject completely.
I need to solve the following problem:- Create a server application which generates a random number every second- Have any number of client applications access the current random number through a dll (associated to the server) at anytime How would I do this? Anyone has a prototype VB.Net code for the server which does this kind of thing? I'm pretty sure I know how to write the client code.
I am after some code that read several mailboxes on a particular server on the network and bring me back the date of the last mail within each one. Is this possible ?