I was wondering if it is possible to attach a local version of sql server to a remote database file. I have someone working on my program from the next desk over, and he needs access to the actual database we're using to add tables and stored procs. Is this even possible?
I have an array of drop down lists. I also have a procedure that initializes the array (at least I thought) or rather, loads the ddls if I'm saying that right. I also have a for loop that takes the data from a data table and binds it to each of the four drop down lists. When I run the program...
I had to make changes to a vb6 program for a customer. I converted the program into vb .net and made the changes. Now, my customer cannot run the program. He gets the error message:
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in system.windows.forms.dll
Additional...
I need to update address records based on whether the address is odd or even. Is this possible? I have not found the syntax. Basically I want to say:
UPDATE Addresses
SET StreetId = 2
WHERE StreetId = 3
AND Address >= 1
AND Address <= 4197
AND [Address is ODD]
Is this totally ridiculous or...
I need help please. I have no experience with handhelds or Windows CE.
I have an iPAQ on which I am trying to run a .net mobile device program written by our company. It was working fine. I need to install the pgm on a customer's iPAQ because their battery died and when they replaced it, and...
I have a table with 4 different status fields. I have a stored procedure that would work for updating each one, the only difference would be the name of the field that was to be updated. Being new at this, I tried:
CREATE PROCEDURE [dbo].[pPermit_UpdateForms]
@Field varchar(20),
@PermitId int...
I have a datagrid with textboxes. I have figured out how to access the textboxes for input and save the data. Now I need to display a record's data. If there is an existing record, I need the info to display in the textboxes. However I cannot seem to access the cells or the textboxes. I've tried...
Is it possible to create a single stored procedure that does two things from two different tables? I would like to write one that says
SELECT this value from table1
WHERE othervalue = whatever
THEN
SELECT this value from table2
WHERE table1Value = table2value
Is that possible or do I have to...
I have both an Add and an Update function and stored procedure. I am using the same code for both functions with the exception of the parameters (Update has 2 Add doesn't have). The Add function works fine, the Update doesn't work at all.
VB Code:
Private Sub Update()
Dim cmd As New...
Please look at the following code. I know I am missing something simple, but I can't seem to figure it out.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ds As New DataSet
Dim conn As New SqlConnection("Data...
Would this be the wrong forum to ask about connecting to a SQL Server database through a VB .net application? A web application to be specific. I have found a couple ways to write connection strings, however I need access to the stored procedures. Can you only access the stored procedures...
Please forgive me if this is the wrong forum. And also I'm a total newbie at SQLServer.
I'm working with SQLServer2k. When I do a syntax check on my stored procedure, I get an error message. It says the error message # (156) and that there is a syntax error near the keyword SET. Well there are...
This is probably a stupid question, but I can't seem to find what I'm doing wrong. Here is my IIF statement:
SELECT...<misc stuff here>,
IIF((Segments.BStreetAddress) = 1, ' ' AS BAddress, Segments.BStreetAddress AS BAddress)
I'm getting a missing operator error.
Is it the space thing? Any...
I am combining 4 fields in my table into one. The third field is often either Null or an empty string. I know to exclude the Null values you use the + instead of &.
SELECT Name & ' ' & Type & ' (' + SRNumber + ')' & ' ' & City AS FullName
That works great when SRNumber is Null. But many times...
I am running a query that takes Streets.Name and Streets.Type and combines them into a field called Street. Sometimes Streets.Type is NULL. When it is NULL, I get nothing in Street - empty string. Is there a way to say in the select statement, to use Streets.Name for Street if Streets.Type is...
I need to use a left join with a bunch of tables. The catch is I have to use aliases for a couple fields. When I try and use the working left join statement with the aliases, I get errors of all sorts.
SELECT DISTINCT Addresses.Address & ' ' & Streets.Name & ' ' & Streets.Type as StreetAddress...
I would like to get the count of the number of records returned by the following stmt:
SELECT DISTINCT ...<a bunch of fields from all tables>
FROM Streets INNER JOIN (Addresses LEFT JOIN (Segments LEFT JOIN ESNs ON Segments.ESNId = ESNs.Id) ON (Addresses.StreetId = Segments.StreetId) AND...
This is a little hard to explain so please bear with me.
I have 4 tables connected as follows:
Addresses
Streets
Segments
ESNs
Addresses.StreetId = Streets.Id
Streets.Id = Segments.StreetId
Segments.ESNId = ESNs.Id
I am running a query that I want to retrieve all addresses regardless of...
I have a sql statement that involves aliases, the TOP keyword, and inner joins. The statement that produces the first page of my report works like a charm. However, the statement that gets the info for page 2, 3, etc, is doing something odd. I'm supposed to get 50 records (streets) at a time...
Good morning...
I am trying to run a query that requests the Top 100 (or 200 or whatever based on the user's choice) records from my database. Well to be more specific, I have a streets table and an addresses table. I want the top 100 streets, and all the addresses that correspond to those...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.