DB/Reporting :: Queries In SQL Servver SSMS?
Nov 4, 2010
I'm new to SQL Server but have been using Access with Visual Basic for quite some time.I am moving an existing project from Access to SQL Server 2008 Express R2. Using the SSMS I redid a number of Queries and SSMS puts the queies in a folder entitled "Project" which is not pointed at any specific database on the server.When I try to call a query in Visual Basic I get the error "Could not find stored procedure...".
Obviously there is something that I am missing, but I don't know what. Can anyone tell me where I should have these queries filed in SSMS?
View 1 Replies
ADVERTISEMENT
Nov 5, 2010
I am at a loss to figure out why this code results in 2 errors when I try to Parse it inthe SSMS.
@Collection varchar = Books,
@Title varchar = 0,
@Authors varchar = 0,
[Code].....
I think that I re wrote this query ten times todaday and continue to get errors and don't know what my problem is
There are underlines in red under the 0 in the BookLoanStatus and under all of the parameters in the SQL.
View 2 Replies
Aug 2, 2011
We have a reporting system where in we are getting unexpected results:
1) The size of reports at different time of interval is different?
2) The reports are writen as pdf to a directory. When we have thousand of older unused pdf(which will not get merged) in the directory the Adobe Life Cycle(to murge the PDF) throws error.But when we clear the directory by deleting the old unused pdf, it works fine?
3) Some of the pdf that are rejected by Adobe life cycle may or may not be corrupted. Meaning they may or may not open up with Adobe Reader, manually.
View 1 Replies
Sep 3, 2009
I got the whole database thing figured out now I've got a problem with these parametrized queries. If I remove them and just explicitly put in the data I'm looking for the datareader works, however doing as I have below returns no results in the datareader.
[Code]...
View 2 Replies
Aug 24, 2010
I have a program that generates text tab-delimited files with a header row and sometimes a units row followed by data.
Example:
FirstName LastName Birthday
Michael Jordan 6/6/66
Alan Jackson 7/7/77
or
FirstName LastName Birthday
Name Name Date
Michael Jordan 6/6/66
Alan Jackson 7/7/77
I would like to be able to perform SQL queries on these files. How can I connect to a text tab delimited file to either pretend it is a database table or import it into SQL as a table, preferably through VB.NET? I could have 300,000 rows, and the fields are all numbers, not text... I have manually imported these files into SQL before using management studio, so I know it is possible but I would love to be able to do it programmatically.
Is there any way I can get the SQL code from this process because it does exactly what I need it to do but it is manual. There is an SSIS package that I saved, but I do not know what that is.
View 1 Replies
Apr 21, 2008
I am working on a Data Survey Project and first I have a few questions about the different types of databases, and second, I need help querying my tables that have relationships.
1. I need a database that is stand alone. It is just the back end for the program. Simply to hold all the data an employee gets while out on a job. So would I be better using access, or SQL Express? I have played with both, but I do not want a large redistribution to my user machines. When I compile and produce this app does the SQL Database still work without installing any SQL Technology? Or do they have to go in after they install my app, and install Express?
2.Overview: I suppose depending on the first question regarding the database, it might change this question a bit, but none the less...I have 4 tables( using Access at the moment) I will be generating Reports based on data in the database. I haven't gotten that far yet. *Project* is the table that holds all the details that pertain to the job and client. It has a "one-to-many" relationship to *Survey*. So for one customer there are going to be many Survey Records. *Project Type* also has a 1-to-many back to *Projects*. Parts is kind of an orphan, but is linked to the *Survey* table with a one to many. So there can be many parts for one survey. I wanted this table for a drop down box, so the user could just simply select what hardware he was using instead of typing all the names and parts.
So in VS 2008 using the Designers and related Query tools, how do I constrain the Survey Data to one Customer? I have one form that opens from a button that is "New Project" and then there are all the *project* fields listed, so the user fills out the info and hits accept and that opens a new form called "frmSurvey" I need to add some code to the accept button to check what type of project is selected from the frmNewProject and then run a select query based on that. How do I write query statements in the code section of the form, without using the Visual Database tools?
Ill stop here, and get these questions out of the way first. If I could just get a handle on how to use the data properly with different forms and different controls with my queries, that would be great.
DATABASE
CODE:
View 4 Replies
Jan 6, 2010
I am writing a message system on my server, the xml is something like this
<xml>
<entry>
<sender>[code]....
my problem now i guess is 2 fold, i wish to combine the first 3 queries into a single query and place in a list or a collection or is there a way to do this with a single query that will give me my desired result?
View 1 Replies
Aug 11, 2009
I'm developing the skill to create addin for SSMS and I've develop a sample addin for Microsoft SQL Server management studio express using a tutorial[URL]..I tried similar addin with all the needed references in project specified in tutorial code, its not showing anything in the Miscrosoft SQL server management studio.
I've SQL Server express 2005 and Microsoft SQL Server management studio express installed on my machine. and I've created the add in by using VS 2008. Please anybody let me know whether there is wrong in the development environment. I've created thread in this section as project is related to VS 2008,
View 1 Replies
Jul 26, 2011
Let us start with...yes I am new to SQL and really only a lightweight programmer. So I am assuming that I am doing something horribly wrong. I have spent days on the MS forums looking for an answer to no avail. So I am going to give as much info as possible. Application language is VBExpress 2010 and using SQLExpress 2008. The Database contain basic tables, no stored procs, no views, no diagrams. The Application has configured diagrams where one of the tables has inner joins... Tables origninally built in SSMS, but have been altered in VBE.
[Code]...
View 1 Replies
Sep 30, 2011
how many of you out there in the VB.NET community have installed VS2010 SP1 and are experiencing this issue with the loss of intellisense in SQL Server 2008 R2?I'm holding off installing SP1 because I kind of like the intellisense thingy (though RedGate's SQLPrompt 5 is way better - have it at home).So is this pee-ing you off, have you explored workarounds, tries the hotfixes (that apparently don't work for many setups)?url...Please note that even though Cumulative Update 9 (CU9) was released the month there are still people it does not work for..including a coworker using a similar setup as mine (Win7 Pro, x32) This is a disaster and embarassment for MS IMO
View 2 Replies
Jun 17, 2010
I am trying to write an add-in into the SSMS 2008 R2 IDE. I believe it is possible, though maybe not fully supported by Microsoft. I have created a new project in Visual Studio 2010 of type Extensibility - Visual Studio Add-in. This has created my project and all of the relevant code to get the add-in loaded onto the Tools menu. The only line of code I have added is in the OnConnection method to display a messagebox so I know it has at least loaded.
When I build this as is, it will load as an Add-in into VS 2010 onto the Tools menu - which is fine - at least part is working. But when I try to add this as an Add-in into SSMS 2008 it keeps giving me the error message:The Add-in 'DataFollower.Connect' failed to load or cause an exception. Would you like to remove this add-in? ... Error Message: No such interface supported.
Below is a top half of the code in question. This code was created directly from the VS Add-in template - nothing has been altered. The error occurs on the line:
_applicationObject = CType(application, DTE2)
This is running on a Windows 7 64bit machine, SQL 2008 R2 64bit and VS 2010.
Imports System
Imports Microsoft.VisualStudio.CommandBars
Imports Extensibility
Imports EnvDTE
[code]....
View 1 Replies
Mar 25, 2011
An in-line table valued function in SSMS takes about 6 seconds to return 11088 records. The same function in VB .Net 4.0 using TableAdapters.InputTableAdapter.GetData (Created with data set designer) takes about 15 minutes complete.Both are executed from the same workstation.Why does this discrepancy exist?
Workstation:
Windows XP SP3, 2GB
VS2010 Ultimate
.Net 4.0 Framework
Server:
SQL Server 2008
View 3 Replies
Jan 9, 2009
I want to do something like this:
Code:
'create a dataset and a table
Dim ds As New DataSet
[code].....
View 5 Replies
Dec 5, 2010
I have a Access 2003 backend db and I'm using vb 2005 to connect to the db via conntection string. It works ok! I can see all the tables but only some of the queries. Why should some queries be absent? In 1 query I have a user define function which cuts up a string. I've created a new VB project with a new connection but the same result. I've compacted the database with not change.
View 2 Replies
Jun 8, 2011
I am trying to UNION the two queries below without success.
Dim
ds1
As
New
DataSet
Dim
MyConnection1 As
New
OleDb.OleDbConnection(GetPOWERConnectionString())
[Code] .....
View 2 Replies
Aug 3, 2011
I am trying to perform a search query using drop down boxes with a button named search. I want it to bring up the data that is searched for. I dont know where to start from, i have looked around for some coding and different ways to do it but they seem complicated, this is the bit of ASP that is my weakness, need some assistance and guidance. below is the code for the page;
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ForSale.aspx.vb" Inherits="Users_ForSale" title="Properties For Sale" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
[code]......
View 1 Replies
Feb 19, 2010
I'm trying to figure out how to do SQL queries towards an SQL 2005 Express server and format the return value to JSON. I got the queries working using this (perhaps very newbie-like) code;
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.UI
[code]....
View 3 Replies
Aug 6, 2009
Where can I find informations on which WMI queries are in fact available for .NET interface through ManagementObjectSearcher. The command below returns exception for "Win32_LogicalDisk", but works for "Win32_Environment". Every reference in msdn directs to msdn library, which contains all Win32 and COM development classes (that seems not to be available from vb .net code):
[Code]...
View 2 Replies
Nov 5, 2010
I have a form that will have at least 3 seperate sql queries that I want to have submitted with an onclick event.
View 4 Replies
May 18, 2012
I've been going through a lot of forums and see a lot of mention of ADO.NET and how it's better to use. I guess because it's newer and being maintained with current times?I've done google searches for this, but every time I see different programming languages other than VB.NET implementing param queries with ADO.net, or it brings me to results that have oledb commands again.Is there a good ADO.NET for VB.NET tutorial with parametrized queries?
View 3 Replies
Dec 14, 2011
finish my querie, it works for the first 2 rows, I need ti to loop through my dgv:
[Code]...
View 4 Replies
Sep 22, 2010
I want to send the a vb.net application which will run some updates on the database. I have built the sql script files which i would normally run thru query analyser but that is not available thru MSDE.I know i can use OSQL or ISQL to run these scripts but i really want to run them thru a VB.Net application.here is the code i'm using which is generating an error beacuse i'm trying to execute more than one statement?
Dim connectionString As String = ' CONNECTION STRING IS HERE
Dim conn As New SqlClient.SqlConnection(connectionString)
Dim cmd As New SqlClient.SqlCommand
[code]....
View 9 Replies
Nov 23, 2009
i have a form which once the user has entered their correct Account No they will access the jobs relating to their number. I now need to use and update query so that once I select yes in the Query handled box, after clicking the update button, this row will then be deleted from the table. Here is the code that I have so far:
Public Class Form1
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
[code]....
View 1 Replies
May 18, 2009
I am a beginner when it comes to VB express. I went to the FAQ and found what looked like the answer to my question in "Database - How can I put the value of a variable/control into my SQL statement?" which said I should use thecode ...... where Field = ' " & variablename & " ' at the end of the SQL statement
I am using a field defined as a nchar with 10 charecters and my variable is defined as a string. my field has been given the value "abcdefghij" so it is full to avoid confusion with spaces and even though the variable is identical and I have used the len command to check there are no hidden spaces etc. When I run the query I get no records selected. What am I doing wrong?. If I use Where Field = 'abcdefghij', ie specify the value in the SQL I get the correct records selected but this does not give me the flexibility I need
View 6 Replies
Aug 24, 2011
I have a basic grid of Linq2Sql entities (frmList). I have a separate form for editing (frmEdit). frmEdit has its own DataContext (as that appears to be the recommended way). How can I tell when my detail form has saved changes?
I don't see a built-in method. I am considering raising an event on the detail form when I save the datacontex, but not sure how I consume this event on frmList, and I have a feeling these events are already created for me somewhere?
View 1 Replies
May 6, 2010
I have a data driven application in <acronym title="Visual Basic">VB</acronym> which works with an SQL Server 05 Database.Since this app makes use of many queries and commands, occasionally i'me getting a timeout error as the connection pool is full. So i figured that at a specifc point in time within the app,i'll clear the connection pools using the ClearAllPools method rather than increase max pool size.
I'm using the performance monitor on my XP development machine (NumberOfPooledConnections) however not once do i see the number of Pooled Connections reset to 0 even when that method is called.How can I determine that my solution is working (if it is) before I deploy the update?
View 1 Replies
Apr 15, 2012
always had a problem getting my head around it. I don't have a very strong mental model of how the code flows. My main problem is i think i understand the syntax, but not really its application. Any links people found useful would be great.
Couple of questions. The code below doesn't make sense to me (written by someone else) the application is basically a csv reader, but manipulates the data.
Public Sub entryType()
[code].....
View 1 Replies
Apr 23, 2009
I am using C# and MSAccess as my database.
Code:private void ExecuteQuery(string strempname,string strQuestion,string IndividualRating,string OverallRating, string Comment1, string Comment2,string Comment3, string SessionName) { string strQuery= string.Empty; try { strQuery = "insert into FeedbackDetails(EmpName,Question,IndividualRating,OverallRating,Comment1,Comment2,Comment3,SessionName)"
[code]....
so this actually opens and close connection for every method. but i need to open and close the connection only one time. so how to customize this code to achieve my need. now i am hitting database for 14 times in a button click as of now. instead i need to hit only once but all the rows has to be inserted in my database.i am using MSAccess as Database.
View 3 Replies
Dec 4, 2009
Using parameterized queries with ms access 2003 integration. To search any data according to different criteria.
View 2 Replies
Oct 11, 2010
Let's say I have 3 tables: carts, baskets and eggs where a basket can contain many eggs and where carts contain many baskets. Each basket has a foreign key that maps to a cart and each egg has a foreign key that maps to a basket.I need to return a table that contains these 3 columns:Cart Name | Count of Baskets in Cart | Count of Eggs in Cart.Each table is an EF and I'm using linq with VB.So far, I have 2 queries: one that returns the columns Cart Name and Count of Basket and another one that returns Cart Name and Count of Eggs. How can I combine these two result tables so that I get the results in one table?
Dim query1 = (From cart In myEntities.Carts
Where cart.UserID = TheUserID
Join baskets In myEntities.Baskets On baskets.CartID Equals cart.CartID
[code]...
View 2 Replies