Hello, Folks. I am not sure if this can be done (and a brief search of
this group didn't yield any results that I thought would do the trick)
but if it can be done it would make my life easier so here goes.
First, what I am trying to accomplish is to make a program I've written
automatically update itself if there is a newer version on the network.
Second, my application runs on one or more computers at many
geographically separated locations. I have remote control software
that enables me to remotely update and troubleshoot my application but
I since I have to pay for this access per computer I don't have the
ability to control each and every computer that runs my software (for
those clients with more than one computer that uses my software).
Third, my application uses as its data storage system MSDE 2000 (with
current service pack).
Fourth, my users are not technical people and I want to rely on them as
little as possible.
Fifth, not all of the workstations are Internet enabled or connected,
so having the application check a website for an update is not
feasible.
Finally, to bring those different pieces together, what I want to be
able to do is connect to and control the "server" (the computer with
MSDE installed on it) and store in the database what the current
version number is along with the current program files. Then, when the
application launches, it will check that stored version number against
it's own version number to determine if there is a newer version
available. If there is a newer version available I want it to update
itself (that workstation) by retrieving that newer software from the
database. I want to avoid file sharing because it's problematic and
since I already have SQL Server (MSDE) running on the network I'd like
to use that.
Is there some way that I can either a) store my program files (one EXE
approximately 5MB in size and one OCX approximately 250KB in size) in a
table to be retrieved by my application so it can update itself or b) a
way to get SQL Server (MSDE) to read a file locally on the server and
return it to my application just like it would any recordset so I could
just tell it where the file was and let it read it from whichever
folder it's stored in?
I've looked at making a column of datatype Binary, and perhaps that's
the way I'll go (re-creating the field to the correct size each time I
do an update or perhaps making it really big so I don't have to worry
about the size). But I thought I'd ask around first since this isn't
anything I know much about.
what the program will do if we caught that exception .. i need some suggestions ... i got this exception(String or binary data would be truncated. The statement has been terminated.).. will it affect the functionality of the program...
i need to check that the column exist in the table if yes the update/insert value in the column else i need to add the new column like new browser name in the table.
Hello All, Is it possible to force a delete of a table even when another program is using that DB, and still has some view data on that specific table. I know that I can delete tables if another program is just have connection to the DB, but not using the specific table I'd like to delete. Can it be done also on a viewed table?
I'm programmatically able to import data between tables when the Destination table already exists but when Detination table has to be created on the fly (Name will be provided), I'm not successful in doing so.
Basically the requirement is to dump the resultset from the source in to a temp table so that the temp (Destination) table matches the Source's Schema exactly.
I am wondering if tempdb stores all results tempararily whenever I query a large fact table with over 4 million records which joins another dimension table? Since each time when I run the query, the tempdb grows to nearly 1GB which nearly runs out all the space on my local system drive, as a result the performance totally down. Is there any way to fix this problem? Thanks a lot in advance and I am looking forward to hearing from you shortly for your kind advices.
In return I need to check column Status for whenever the value has changed and need to store that in my table. If there are two records for which value in column Status is same, I need to pick only one of the records and that being the earliest of them and therefore the Date field is mentioned in my table . My output should be something like below.
Hi guys, now i was able to get the results of the query i made. and the remaining problem now is how can i store the results to my database? here's the my code: protected void btnGenerate_Click(object sender, EventArgs e) { _con = new SqlConnection(database.evgConnection()); _comm = new SqlCommand("EV_usp_SearchNoticeLocation", _con); _comm.CommandType = CommandType.StoredProcedure; _comm.Parameters.AddWithValue("@Locationid", ddlLocation.SelectedValue); _adapt = new SqlDataAdapter(_comm); DataSet objDataset = new DataSet(); _adapt.Fill(objDataset); GridView1.DataSource = objDataset; GridView1.DataBind(); foreach(DataRow dr in objDataset.Tables[0].Rows) { Response.Write(dr["Docownerid"].ToString()); } } how can i store all the Docownerid to another database table?
I have a question. I have a standard query that retrieves the list of users from a database. The query uses "exist" statement and inside it I have another smaller query. The smaller query which used withing exist statement is called numerous times during the query execution. I am wondering if I can speed things up by storing result of a smaller query in a table rather than asking DB to run it again and again. The query takes over a minute to run and I am trying to find a way of speeding it up.
How can I store more than one category in a products table? For exampe: I have a dvd website where the admin can add new dvd's. On the website all the categories are listed with a checkbox. If the dvd is a action comedy the admin have to check these two checkboxes. But how do I store that in the sql database an retrieve it? Thanks David
I'm writing a search engine and I want to make a search and then, after I've recieved the results, put them into some sort of temporary(in mememory) table so that I can do another query on that temporary table.
I saw something about temp tables (in T-SQL) in the help guide, but I still want to know how to do a query on a regular table and then store those results in a temporary table to perform a query on that. Could anyone show me some example or something?
I would like to store and read .doc file in a table of sql server using C#. Can some body help me on this? my id is padam76@gmail.com. Thanks & Regard,Padam Kumar Tripathi
Can you store images in a database or in a table, or do you have to only store the image path/name in the database while the image is in another folder? IF anyone knows, please share with me. Thanks.
Hi I am new to SQL programming. This is what I am trying to do in store procedure. Alter a table - adding two columns. Then update those columns Both the above action in same procedure . When I execute them - it complains that the columns I am adding in the first part of store procedure , does not exists. So the SP looks like this create store procedure <name> as alter table <name> ADD column_1 nvarchar (256), column_2 nvarchar (256);
update table set column_1 = <condition> column_2 = <condition>
The SQL complains - invalid column name column_1 invalid column name column_2
One column in my table stores SQL queries(QueryCoulmn). Another coulmn supposed to store the result of those queries(ResultColumn). Can I run an update query or how can I do that? I could not figure out the syntax.
update tablename set ResultColumn=exec(QueryCoulmn)
DECLARE @AssessBenefitID INT DECLARE @ActualQuantity INT DECLARE @ExpectedQuantity INT DECLARE @ActualQuality VARCHAR(2000) DECLARE @ExpectedQuality VARCHAR(2000) DECLARE @AssessFlag CHAR DECLARE CUR_BENEFIT CURSOR FOR SELECT AssessBenefitID,ProjectBenefitID,AssessFlag FROM PMPT_AssessBenefit WHERE ProjectBenefitID=@ProjectBenefitID
OPEN CUR_BENEFIT
FETCH NEXT FROM CUR_BENEFIT INTO @AssessBenefitID,@ProjectBenefitID,@AssessFlag
WHILE @@FETCH_STATUS = 0 BEGIN
SELECT @ActualQuantity=Quantity FROM dbo.PMPT_AssessBenefit WHERE AssessFlag='A' AND AssessBenefitID=@AssessBenefitID AND ProjectBenefitID=@ProjectBenefitID SELECT @ExpectedQuantity=Quantity FROM dbo.PMPT_AssessBenefit WHERE AssessFlag='E' AND AssessBenefitID=@AssessBenefitID AND ProjectBenefitID=@ProjectBenefitID SELECT @ActualQuality=Quality FROM dbo.PMPT_AssessBenefit WHERE AssessFlag='A' AND AssessBenefitID=@AssessBenefitID AND ProjectBenefitID=@ProjectBenefitID SELECT @ExpectedQuality=Quality FROM dbo.PMPT_AssessBenefit WHERE AssessFlag='E' AND AssessBenefitID=@AssessBenefitID AND ProjectBenefitID=@ProjectBenefitID
In my application, I have a master table that stores information about some other user tables. These other tables are all of different types, that is, the number and type of columns need not match across the user tables.
From the application perspective, logically each of these user tables is nothing but a column field within the master table.
I have seen references about "table" data type in SQL Server. It is possible to create a table that actually has a table data type as its field?
I want to store the contents of an MS Word document (or a brief Word extract) in a database field. This document could contain carriage returns, boldface, etc. I have tried storing the Word doc in fields of type nchar, text, and sql_variant but they do not keep the Word formatting. I found that the "Extended Properties" attribute of a field seems to retain these properties. (Though if I recall right, Extended Properties has a length limitation and is a pain in the #*&_*^! to access)
What is the "right" way to do what I'm trying? Keep in mind that we may want to view this document under either "Query Analyzer" or print a hardcopy version. And we'd like both to be intelligible!
Can any one please tell me where i am going wrong..
Code Snippet create proc SP_PercentageRMU as SELECT cast (sum([Usage Qty]) as [decimal] (28,8))as 'TUsageQty' ,RAW_MATERIAL into #TZMelt_Pound FROM [LatrobeOCT].[dbo].[ZMelt_Pound]
group by RAW_MATERIAL GO select [Usage Qty],(case when r.raw_material = z.raw_material then cast ((r.[usage QTY] / z.TUsageQty) as decimal (28,8)) else 0 end) as '%UsageQty' ,r.[PRODL]
,r.RAW_MATERIAL ,r.[GRADECODE] into #PZMelt_Pound FROM [LatrobeOCT].[dbo].[ZMelt_Pound]r inner join #TZMelt_Pound z on r.raw_material = z.raw_material
I'm quite new to T-SQL and is about to build a small reporting db using SQL. Most of the data I can move with normal INSERT INTO ... SELECT, but there are some tables that I want to produce using T-SQL. For example I want to build a Date table like..
Date Year Quarter Month WeekDay ...
With some precalculated values for each date.
I've searched the forum but have not found any information on how to produce table contents in a good manner. I would appreciate if someone would have the time to point me in the right direction. I do not want to do this by code in my application.
My first thought is to use some kind of Insert Cursor in a While loop...
Pseudo: --------------------- declare cursor ex for 'Insert table ... '
while begin
(produce data) insert data end
close cursor ---------------------
While browsing the net I've got the feeling that you use cursor less in SQL Server than in other db-engines...
HI I have a problem related Store Procedure, that i am trying to extact a value from Database (Like FirstName,LastName,Email Address) through Store Procedure and Display it in the DropDownList(Like: FirstName LastName ,(xyz@xyz.com)) , and this is working correctly. Now i try to check the value at the same time if it is NULL value in the Database then pass EmptyString to the DropDownList Like ("" "" ,(xyz@xyz.com)) how i can do that in the store procedure. Comments will be appreciated.
Assume that if i have a product called Jacket that has the following descriptions, which written in bullet form
• 600 Denier Carbolex® coated 1000mm Polyurethane • Anatomically fitted for the riding position • Ballistic nylon in protective areas • FS Rainguard® 100% waterproof/breathable jet-liner • Polyester mesh non-allergenic liner • Removable CE armour equipped in the hips and knees • Padding at knees, shin, hips and kidney area • Removable zip-out satin quilted liner • Reflective Phoslite® • Stretch in the knees • Gusseted with Velcro front zip closure • Velcro adjustable waist • 2 front pockets • Storm flap system
How am i going to store in the Products table ? But not all products have these descriptions, other products may have no description at all.... If I store them in a text/memo DESCRIPTION field, then , I do not know how to format them into bullet form...
I would appreciate anyone knows the solution for me... Thanks in advance !
Does anyone know how to save the output of a stored procedure into a table? I would like to be able to use some procedures such as the sp_helpfile and dbcc sqlperf(logspace) and save to output into a table. Does anyone have any ideas?