I have a SQL query that I want to integrate into a VBA subroutine in Excel. I have had some success using the Macro Recorder to call up the SQL query (throuh Microsoft Query) in the past. However, the SQL code that I have for this query is significantly larger than previous attempts.When I record this one through the Macro Recorder is trips up because there are too many line breaks integrated into the recorded code. To get around this I have tried to manually update previous (successful) queries with the larger SQL code that I want to use, but without success.I was hoping that someone out there has some experience in integrating the standard SQL query code (SELECT xxxx, yyyy, zzzz, *nnnn FROM aaaa, bbbb, cccc, *nnnn WHERE 1111, 2222, 3333, *nnnn) into VBA.
I am a student and I am about to make a program that will use a barcode scanner well ofcourse to scan a barcode. My problem is i don't know what library to use and what certain things i need to do so that when i am going to scan a barcode it'll be something like show it on a textbox and pull something from the database. i've actually research some. i've seen mscomm1 (not so sure about that) and POS for .net (haven't fully understood its use) were those will help me develop my program?
i have a metrologic ms9520 Voyager barcode scanner. and i am going to create a program for it in vb2005.
I have been asked to create a project in vb.net which needs to integrate a java class created by Apple (Autoingestion.class) to pull sales records and so on.I found out a couple of questions here on stackoverflow but none of the answers given worked for me when trying to integrate this java class in my .net application.For example this question seemed to be what I really needed but when trying to compile this java class (I decompiled it first using Java Decompiler), it generally throws some errors.All I need is to use this class in my application to invoke a method.Does anyone know how to pull this out without much ninja-ing?
I have been looking for a way to create QR Codes using VB.Net but I am going round in circles. I found some samples but they use C#. Also read about ZXing library but I have no idea about how to reference it (or what to reference). Can you suggest a tutorial (for complete beginners) as to how to go about finding an open source library and referencing it i
So I currently have a aspx page that shows details for any single staff member, and the page is setup with mostly ASP labels. I have a subroutine called "getstaffdata" that populates the page on load (via subroutine).
I would like to convert this to a page that shows details on one staff member, or many staff members, one after another. So I thought of using the repeater control, but I'm not sure how to convert the page over. The staff userids are passed via query string, but I'm just confused on how to do the datasource for the repeater control.
I'm using this link in my webbrowser: url...And I'm prompted for my Army username and password. It works and the page begins to load (showing a loading bar across the screen) as it's almost finished, a window pops up saying this:"Couldn't load config value for the policy file url; values are: , connectionType:http, password:, server:akoim.us.army.mil, autoLogin:false, red:1, location:, blue:1, green:1, username:".And then it asks me to log in again.how I can successfully complete this? The URL is for the AKO instant message service and I'd liek to integrate it into my program,
how to integrate bing map in Desktop Application (VB.Net).Is there any option to pull the data from Database from the locations and display the routes for more than one routes?My requirement is I need to show the routes like,
Person A's Route: Starting point a to b, b to c Route color: Blue
I want to start learning/using modules instead of integrating the code directly into the program. So, I tried to make an example. Basically, what I wanted the program to do, is I click button1 and it lists details about my computer. So, I added 7 labels to the form, and a button. Then, I added a module (Module1.vb)
This one is blowing my mind and I could use a little expertise. I'm retrieving data from an Excel sheet, using a simple SQL query using a textbox as input to my variable. It works great when I enter an integer to search for (such as 213 for example) but when I put in a mixture of numbers and letters (48A for example) I get the following error: Syntax error (missing operator) in query expression '[P&L]=48A'. [code]...
I need to emulate an Excel Web Query in .net Below is the sample code.I get an Error500 when I attempt to do this in .net, however in Excel it works fine.When I change the URI to a normal website it works fine, and returns the html from the page, which i what i am after. I wonder if the problem lies from the fact that I am trying to return a datatable
Dim oHttpWebRequest As System.Net.HttpWebRequest Dim oStream As System.IO.Stream Dim sChunk As String[code]....
Edit: I am getting the error when I getReponse from the server
I am using VB.NET to query via SQL an Excel spreadsheet using ADO. The general way is like this: SELECT [firstname], [secondname] FROM [Sheet1$] Which works perfectly However, one of the headings is called 3, so I want to do: SELECT [firstname], [secondname], [3] FROM [Sheet1$] However, this does not work. I know I can use * to get all columns, but later on I want to use (using dataReader): dr("3") which won't work
I'm retrieving data from an Excel sheet, using a simple SQL query using a textbox as input to my variable. It works great when I enter an integer to search for (such as 213 for example) but when I put in a mixture of numbers and letters (48A for example) I get the following error: Syntax error (missing operator) in query expression '[P&L]=48A'. Can anyone tell me the fix for this? I know it has something somewhere to do with integers.
Private Sub MPLS3() Dim BrNr As String BrNr = TextBox1.Text
Im wanting to pull some data from our Remedy Server every so often. Right now we're having to do it manually; Data > Import External Data or New Database Query. The connection is called AR System ODBC Connection Source. We have to log into the server and then it pulls the info into the sheet. Im needing even if have to setup a conection myself first to just have this conection run every couple or two and update the excel sheet. We're using excel 03, Remedy 7.
I have a query being created using oledb from access and need to get the information to an already existing excel spread sheet. I am using VS 2010 with vb.net, access and excel are 2010. I have been running in circles for the last two days and cannot figure out how to get the data from a datareader into excel. This is a vb.net console app, so no web tables or grids can be used.
Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:PureshowPureshow.mdb;") Dim cmd As New OleDb.OleDbCommand("SELECT PWTC08.Lot AS LotID, PWTC08.Reg AS OfficialID FROM ((PWTC08 INNER JOIN SWTC08 ON cint(LEFT(PWTC08.Lot,
[Code]....
I am almost to the point of just outputting to a CSV and telling the user to import into excel each time. I can export to excel if I put it in a webform, but I cannot figure out how to do using a console app.
I wont to export query results from Access to Excel.From my Access app i execute this function
Public Sub qExcel(pQuery As String) DoCmd.Hourglass True Dim dbs As ADODB.Connection[code]......
Everything is OK when I run this function for the first time. But when I try to run it the second time I get method range of object _global failed error.Also I've noticed that first execution creates excel process that is in my process list even after I close excel. Second execution creates second process and after error when I close excel both processes are gone.Third execution creates no error fourth creates errors .... and so on
I have this working on VB6 that saves a query in a excel sheet:
[Code]...
The XLSNombre is a variable with the name of the excel file that has been set before. The connection I have in .NET is to SQL server (but is the same). How can I use this code (or..how can I make this code work for .NET) or what is the equivalent of this for .NET? I found some solutions but with inserts of single rows or I have to set the title of the columns, I dont find any "simple" solution to do an "insert into" (like the code I use in VB6).
I would like to generate an Excel file using a database query in VB.Net. How can I do it? To be more precise: I would like to "bind" a query (much like binding a query to a GridView) to an Excel file such that the rows in the table occupy corresponding cells in a new Excel file, and save the file to my computer. And then, mail that file to someone. While I can handle the mailing part, it's the creation of such a file that I need help with. Anyone know how to achieve what I want to achieve? PS: I need to do this in VB.Net and I'm using SQL Server 2008.
I know I've banged heads with this error before, but before the reason was because of my IMEX setting. This is the reason why I made two connections to the spreadsheet, one that uses IMEX=1 for the SELECT query and one with that option removed for the UPDATE / INSERT queries. So now I'm stumped why this is breaking in the following [code].....
Is there an issue with trying to open the same spreadsheet with two connections (I thought I had done this before)? Or some other issue that is causing this error to be thrown? BTW, I'm using this in a vb.net program so I don't think the issue is related to the security issues that asp users usually face with this error... On the other hand, I'm also on Win 7 and I know that its security is much tighter than on XP where I've used other programs that also update an Excel spreadsheet. I wouldn't think so, but would I have to run this in administrator mode in order to update the spreadsheet?
I want to pass some data between an existing excel application and an existing ASP.Net VB Webforms application.
I thought a hyperlink with some query string variables would be the most straightforward means of doing this. However, it seems that the hyperlink does not retain the session of the logged in user.
Testing this with the same URL on a webpage does work. So it seems Excel is starting a new session. Any ideas on how to make Excel hyperlinks behave the same way a browser hyperlink does?
I'm retrieving data from an Excel sheet, using a simple SQL query using a textbox as input to my variable. It works great when I enter an integer to search for (such as 213 for example) but when I put in a mixture of numbers and letters (48A for example) I get the following error: Syntax error (missing operator) in query expression '[P&L]=48A'.
Private Sub MPLS3() Dim BrNr As String BrNr = TextBox1.Text Dim stSQL As String = "SELECT [MPLS Date] FROM [Master Data$] WHERE [P&L]=" & BrNr & ";"
I'm running into a bit of a roadblock here. I have tried to search the web/forums for answer for last several hours to no avail and I'm not the expert VB Programmer.However, I was able to write an app to do the following:
1) read Outlook emails for particular emails containing xml link in which I was able to download the file and save to my hard drive.
2) opened the Excel spreadsheet to run the macro which import those XMLs into existing XLS spreadsheets to refresh the data.
3) Those XLS spreadsheets are linked in my MS Access in which I join all four XLS sheets to create one report via Query which I have created in the past prior to this app development.
I have manually done a File Export of this query via ALT+F then E and what I'd like to do is to either take control of menu commands OR alternate method of performing a File Export to a new Excel spreadsheet (version 2003).I've seen two different methods, one via DoCmd OutputtoFile and another is TransferSpreadsheet.Here's my Access coding I have in my VB 2010:
Imports Microsoft.Office.Interop Public Class OutlookOfflineEmailExtractor Dim wsAccessApp As Access.Application
I have a ASP.NET 2.0 website created in C# that acts as a completely independent site and I am looking to integrate this into an existing ASP.NET 2.0 website created in VB.NET. Unfortunately I just don't know much about the server management side of ASP.NET yet so too much I'm unaware of when it comes to IIS configuration etc. Does anyone have any advice as to how I can go about integrating this? Basically I want to host it in a subdirectory from root so when you hit example.com/myindependantsite/ it will pull up my C# site.
One possible solution I came across mentioned just dropping the project folder into the root directory and setting up that directory as an application virtual directory in IIS? A few other random questions were small things like would my application relative links (~/for-example.aspx) stay relative to my root subdirectory if it's made into an application virtual directory? Just trying to get this running on their site but like I said it's completely independent so want to preserve my websites environment.
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
I need to access the current instance of MS Excel. To do that, I wrote the following code:
Imports Excel = Microsoft.Office.Interop.Excel Imports System.Diagnostics Private _ExcelApp As Excel.Application
[Code].....
The code runs nice, but it has a problem: After the user close the Excel application (click button X - note: no other instance of Excel exists), if you open the Windows's task manager, its possible to see the process Excel.exe.
If I open and close the Excel application, there is no process Excel.exe, but if I run my code with the Excel application openned, after the user close the Excel application, the process Excel.exe isn't finished.
I 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]
The 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