Parse SQL Query Using Program?
Jan 23, 2011I want to convert my MySQL to MSsql using an automated program using vb.net. Do you have any links or parsing engine that could parse Mysql?
View 1 RepliesI want to convert my MySQL to MSsql using an automated program using vb.net. Do you have any links or parsing engine that could parse Mysql?
View 1 RepliesSELECTKindergartenID, Kname, SUM(SumO1) AS Sum01, SUM(dum2) AS Sum02, SUM(dum3) AS Sum03
FROM(SELECTKindergartenID, Kname, SUM([B1&2] + [B3&4] + [B5&6]) AS SumO1, 0 AS dum2, 0 AS dum3
[code]......
I am teaching myself VB.Net and have setup a little App that reads what someone past in a text box for the IN Statment. ie Select from Tabel where Tabel in TextBoxPast.Text. my question is the user will copy and past a vertical column of date from excel inst my textbox an I need a way to parse horizontal row adding a Parentheses ( quotation mark ' first line of my pasted text and quotaion mark ' comma, quotiona mark etc.
Example:
Data1
Data2
Data3
To
('DATA1','DATA2','DATA3')
I would like to parse the result of entering a query at [URL] the problem is that I cant seem to the post data just right and cant properly open a webrequest to the site.
View 3 Repliesmy database is access, i try to Configure dataset as below i get some Error, it say Error in where clause near .unable to parse query text.
View 4 RepliesHas anyone ever done this? Is there a tutorial somewhere?
View 1 RepliesI'm trying to make sense of a big data dump of XML that I need to write to a database using some VB.net code.[code]...
View 3 RepliesI'm trying to parse some XML (html) I downloaded using WebRequest.Create() and then read it. However after loading the XML file using LoadXml(string), anything else I execute doesn't work. Setting a breakpoint on anything afterwards doesn't work and it doesn't break.I tried catching exception but none are occurring, so I'm not sure what the problem is.
Here is my code:
Dim reader As StreamReader = New StreamReader(HTTPResponse.GetResponseStream())
Dim xDoc As XmlDocument = New XmlDocument()
[code].....
How to parse HTML added by code behind using vb.net code ?[code]...
View 1 RepliesI am just wondering if there is any DLLs or features in VB.Net 2008 that I could use to parse a picture of text to text (for example, a screenshot), assuming the text are in very recognizable format (i.e., not like CAPTCHA type of text).
View 2 RepliesI am parsing a web page with the HTML agility pack in vb.net and it works great most of the time, but I have come across a site I need help with.
When I go to grab the web page with my http object (I am using chilkat http and it does not have a javascript engine) I get back the page which is poorly written with document.writes for basically the entire page.
I do not want to use the browser control to first render the page.
Do you know of anything that will allow me to parse this page easily with xpath... does xpath work with javascript? Is there a way for me to remove the javascript with the agility pack?
I just want to parse simple expressions like IIF(FVAL(PFC) = TRUE, (IIF((ORGVAL(BAS, "2012/12/31") + ORGVAL(DA)) < 6500, (FVAL(BAS) + FVAL(DA)) * 12%, 780)), 0)`After parsing this I should be able to know what functions contains what parameters.
[Code]...
I'm stuck with .Net Framework 2.0, so no Linq or lambda expression goodies for me. Also I want to include the code in my custom library and not just reference it. Can anyone point me to some good library or code.
I just need to parse and not evaluate the expression and find what tokens are in use. After finding the tokens I need to change the expression string before parsing, like if the function ORGVAL is used then the parameter passed has has to be prefixed by an underscore. Like ORGVAL(BAS) will transform to ORGVAL(_BAS). Some functions can have tow parameters like ORGVAL(BAS, "2012/12/31") and this will transform to ORGVAL(_BAS, "2012/12/31")
NOTE: IF THERE ARE OTHER WAYS OF DOING IT PLEASE LET ME KNOW. I WOULD LOVE TO AVOID A PARSER AND LEXER.
I am working on a program. I created a database and used it to create a dataGridView in my program. I clicked the table adapter for the program and tried to create a new query. When I did this, I got the following error messages...Error message-the new command text returns data with schema different from schema of the main query check your query's command text if this is not desired Schema returned by the new query differs from the base query I cannot create a query for the database. What is a base query and what can I do to fix this?
View 7 RepliesThere is a "submit" button and a textbox, when the button is pressed, i want to connect to access database and search for the entered text in the textbox . if true i want to show "okay" a string .
View 4 Repliesok, trying to put an INSERT query into my program, but not sure the exact sytax, i know the query itself, but not the rest of the code to get it working.
View 2 RepliesMicrosoft Access queries with somecolumnname = [?] do not show up in the list of Views in the New DataSource Wizard in Visual Studio.
The query works perfectly from within Microsoft Access by just prompting for the values of the parameters.
The columns of the query should populate labels on my form based on the values in a couple textboxes.
What is the "best-practices" way to use parameter queries in my .NET application?
I am trying to do a simple query of selecting an ID number from one table and matching it with the ID number in the other table, however the catch is the two tables are stored on two different sql databases.[code]...
View 5 RepliesTrying to figure out the right way to query a MySql database and find a user defined variable from a Textbox.Text property. I'm not sure what to put for the where clause in order to search every cell of every row for a match. I have looked at coalesce and contains, but neither are really making sense to me and I'm not sure if they are my best option. I'm thinking that the query string will look something like this:
View 2 RepliesHow do i great dynamic linq query in VB.net?
View 3 RepliesI am just creating an update programme that will update another one of my programmes. I have one folder that has got different layers of sub folders and files at each different level. I have got the following code to do this:
cmdUpdate.Enabled = False
cmdSkipUpdate.Enabled = False
Dim strServer As String
[code]....
Here is the code:
Function getData(ByVal id As String)
Dim reader As SqlClient.SqlDataReader
Dim statement As String
[code].....
I am new to LINQ, but have been able to query SQL using LINQ to SQL and then I can data bind the results to a GRID or DROPDOWN LIST with no problem. What I would like to do is load a column into an array. I have seen examples for something like this in C#[code]...
View 12 RepliesI have a 4 table database and need to query at least 2 tables (the single table query works fine). The output goes in textboxes / labels on an existing form.
I'm trying something like this:
Private
Sub AddCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code].....
I have a VB.Net program that will basically make a query to a remote MS-SQL DB using TSQL, return two columns (normally 4 rows/records), 1 is a datetime and 1 is a double. I will then need to return the average of the doubles (which is easy in VB.NET).
As I will need to run this query perhaps 1000 times an hour (programmatically with different input parameters for the query), I am looking for the most efficient way to code this up so that it will take the shortest time to run. I tried SQLDataAdapter and then using dataAdapter.Fill and sometimes it returns an empty set although the raw select query has values returned.
For Each dgr1 In Me.DataGridView1.Rows
[Code]...
I m using access database and vb.net. My problem is that execution of program stops at third and sixth ExecuteNonQuery() methods because they are of string types and i am not able to understand the cause. I have also tried a single insert command but it gives syntax error so I used separate insert commands. The rest of the values are getting inserted properly.
When Creating a query using the sear Criteria Builder . I keep getting the error : "The schema returned by the new query differs from the base query" what does that mean and how do i avoid this problem in future
View 2 RepliesI am connecting to an Access database and using a parameter query with the LIKE operator to return all rows that match query. The string to search for is taken from a Textbox
sql =
"Select * FROM Allview WHERE Info Like" &
"*" &
CStr(TextBox1.Text) &
"*"
The query does not return any data in vb, but when run from access with same string, there is data returned.The connection to the database is done correctly, as I am able to return data with various other queries.
Partial code :
Dim
con As
New OleDb.OleDbConnection[code]....
I am trying to run a query an Access db from VB. The general query which I want to run is
SELECT * FROM Patient WHERE Patient.PatientID = ?
or SELECT * FROM Patient WHERE Patient.PatientLname = ?
I tried using an input box which captured the user input and pass that variable to the query, but that failed. Then I read about writing a function and using that, however, I keep getting an error which says Function not defined, but when stepping through the code, it seems to work. Here is my function: [Code]
How to use this query to update record [code]....
View 1 RepliesThe database:
"ID (Primary key)" | "Title"
0 | "title1"
[code].....
OK, before adding values to database, we should check if a row exists with this values :)TO do this, creating a Stored Procedure is a best way to deal with the database fastly.So... The problem now is, at the runtime, Miss OleDB throw this error:Microsoft Jet database engine cannot find the input table or query 'IF