Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server & have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for

Stock Control, Procedures


I have a table like this:

thing, size, color, type_mov, vary
1, s, red, sell, 1
1, s, red, buy, 2
1, m, green, return, 10

and the question is how I can see the total number of products by size
and color having in mind that some type of movement are + and other
are -.

in other words, like stock control.

how I can control this in sql server?
code, procedures?


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Moved Stock Minus In Item Table To Stock In Itemmoment Table
 helo all...,i want to make procedure like:examplei have table: item (itemid,itemname,stock)orderdetail(no_order,itemid,quantity)itemmoment(itemid,itemname,stock)item table itemid    itemname    stock  c1        coconut         2  p1         peanut          2orderdetail tableno_order        itemid        quantity   1                  c1                5itemmoment tableitemid    itemname    stock  c1       coconut          0  p1       peanut            0 when customer paid, his quantity in orderdetail decrease stock in item stock in item table became:itemid        itemname    stock  c1            coconut         -3  p1            peanut           2it's not good, because stock may not i want to move -3 to itemmoment stock in item table became:itemid        itemname    stock  c1            coconut          0  p1            peanut           2and in itemmoment table became:itemid        itemname    stock  c1             coconut        3  p1             peanut          0my store procedure like:ALTER PROCEDURE [dbo].[orders](    @no_order as integer,    @itemid AS varchar(50),    @quantity AS INT)ASBEGIN    BEGIN TRANSACTION            DECLARE @currentStock AS INT                SET @currentStock = (SELECT [Stok] FROM [item] WHERE [itemid] = @itemid)        UPDATE [item]        SET            [Stock] = @currentStock - @quantity        WHERE            [itemid] = @itemid    COMMIT TRANSACTIONENDit's only decrease stock with quantity. i want move stock minus from item to itemmoment..can anyone add code to my store procedure?plss.. helpp.thxx....

View Replies !   View Related
Stored Procedures And Source Control
We have a large team working on applications to support our internal sales and our public dotcom site.  In the process, as you can imagine, we generate a lot of stored procedures and sql scripts going to our dba's for our staging,qa and production environments- but we don't have a solid way to manage it yet.  Some people use Source Safe?  Does anyone have any successes in this area or recomendations?Thanks!s!Stephen Rylander

View Replies !   View Related
Stored Procedures Under Version Control
Is there a way to put stored procedures under version control using SourceSafe with SQL Server 7? I do not wish to use Visual InterDev with this.

View Replies !   View Related
Control Access To SQL Server 2005 Database Only Through Stored Procedures Issue
I have a database (SQL 2005) with two schemas (dbo and s1) and with tables defined in dbo and tables defined in s1. The stored procedures are also defined in both schemas, some of them in dbo some of them in s1. Some of the stored procedures query tables from dbo and s1 at the same time.  
I want to have a new db role with access to the database only through sps and no other access read/write to the tables. I created a new db role and granted execute permission to it and assigned a user to it.  
When I execute stored procedure defined in dbo with query against dbo tables, it works as expected.
However, if I run stored procedure defined in s1 with query to table in dbo, I receive error about missing select permission for the table in dbo. I am not sure why, but I can  assume there is an issue with the ownership chain.
I can grand read/write permission for the tables, but this will break our original requirement for limited access to the db only through sp.
The other option is to have another role r2, with read/write, privilege and to use EXECUTE AS r2 in the sp.
I would like to ask first why the error for missing select permission happens and is there another way to have role restricted to only execute permission for all stored procedures.

View Replies !   View Related
Stock Inventory Diagram
Hi all, i don't know where to post these, and so i posted in here about sql stuff... I want to do a stock inventory for my restaurant, and i don't know how to start building the database, so, I want to ask if anyone knows if they have a database diagram for stock inventory... any kind of database diagram will helps, so I get and Idea how to start... thanks... 

View Replies !   View Related
Complex Stock Query
Well probably not that complex for some of you out there!

I need to work out the amount of stock which was sold between @datefrom and @dateto and how much we currently have on hand (to work out if we are over ordering etc). That's the pretty easy part but I also need to include a column which works out how many items have been sold 3 months prior to @datefrom (from invoiceline). The proc I have so far works out the items sold between 2 dates so basically what I need is another column which is the amount sold (QtySold) in the 3 months prior to datefrom

This is the basic part I have so far:

ALTER PROCEDURE [dbo].[rptstockholdinglevel]
-- Add the parameters for the stored procedure here
@datefrom datetime,
@dateto datetime,
@periodname varchar(50),
@percentage int
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.

-- Insert statements for procedure here
@periodname AS periodname,
isnull(SUM(invoiceline.qty),0) AS QtySold,
products.qtyonhand AS OnHand,
productmanufacturers RIGHT OUTER JOIN
invoices INNER JOIN
invoiceline ON invoices.invoiceid = invoiceline.invoiceid RIGHT OUTER JOIN
products ON invoiceline.productid = products.productid ON productmanufacturers.manufacturerid = products.manufacturerid LEFT OUTER JOIN
nominals INNER JOIN
productcategories ON nominals.nominalid = productcategories.salesnominal ON products.categoryid = productcategories.productcategoryid
(invoices.invoicedate BETWEEN @datefrom AND @dateto)
(invoices.invoicedate is null)
HAVING (SUM(isnull(invoiceline.qty,0)) < products.qtyonhand)

I'd be really grateful for any pointers as I'm just going round in circles on this one.

Thanks in advance as usual all :)


View Replies !   View Related
Make Procedure For Stock-quantity
 helo alll...,this is my data:my table is item(productid,stock) ,order(customerid,no_order), and orderdetail (no_order,productid,quantity) example: order and orderdetail displayed in gridview....order is displayed like this:                 customerid            no_orderdetail                  A                        1detail                  B                        2  when i click detail in row 2, it's display orderdetail:no_order               productid              quantity       2                            c1                       2  2                            p1                       3 i have make all this is ok. but i want to decrease stok in item with quantity in code in procedure like:CREATE PROCEDURE [dbo].[order_item](@productid AS varchar,@quantity AS INT)ASBEGINBEGIN TRANSACTIONDECLARE @no_order AS INTDECLARE @stock AS INTINSERT INTO [Orderdetail]([ProductId],[Quantity])VALUES(@productId,@quantity)SET @no_order = SCOPE_IDENTITY()SET @Stock = (SELECT [Stock] FROM [item] WHERE [ProductId] = @productId)UPDATE [item]SET[Stock] = @Stock - @quantityWHERE[ProductId] = @productIdCOMMIT TRANSACTIONENDreturn it can't about his true code in store procedure?ok..., thx.. 

View Replies !   View Related
Inventory Stock, Triggers Vs Views/SP

I am designing a Database Application that covers Inventory System. And I am now in a dilemma of chosing which design to track Inventory stock better, in performance, reliability, and error free?

1st Design

..and other unique info of the product..






Tracking Inventory stock is done by using (update, insert and delete) triggers in each of the DETAILS to update the QtyOnHand in the PRODUCT TABLE

2nd Design






The later design does not hold QtyOnHand, but only save QtyBegin instead. To get the QtyOnHand, it uses views/stored procedure with Union Query, so it looks like this:

QtyOnHand = QtyBegin + Sum(QtySold) + Sum(QtyPurchase) + Sum(QtySalesReturn) + ........

And at the end of a accounting period, the calculation of the QtyOnHand will be the QtyBegin of the next accounting period.

According to you guys, which way is better in PERFORMANCE, RELIABILITY, ERROR FREE, and why? What are the pros and cons of these two?

Thanks a lot.

View Replies !   View Related
Changing Timeframes With Stock Data
I have stock data in 1 min intervals and would like to convert it into other timeframes (e.g., 10 min, daily, monthly).

Here's is some sample data and my final goal:

[DateTime]                  [Open]  [High]  [Low]  [Close]  [Volume]
10-Feb-05 12:10:00  3.88      3.88    3.87    3.87      10
10-Feb-05 12:11:00  3.87      3.87    3.87    3.87        2
10-Feb-05 12:12:00  3.86      3.86    3.86    3.86        1
10-Feb-05 12:13:00  3.85      3.87    3.84    3.85      23
10-Feb-05 12:14:00  3.85      3.85    3.85    3.85        6
10-Feb-05 12:15:00  3.86      3.86    3.86    3.86        1
10-Feb-05 12:16:00  3.85      3.85    3.85    3.85        1
10-Feb-05 12:18:00  3.85      3.85    3.85    3.85        3
10-Feb-05 12:19:00  3.85      3.85    3.85    3.85        3

[DateTime]                  [Open]  [High]  [Low]  [Close]  [Volume]
10-Feb-05 12:10:00  3.88      3.88    3.84    3.85      50 *


View Replies !   View Related
Conditional Predictions On Stock Prices?
I would like to use analysis services to analyze stock prices.
I want to find conditional probabilities: 
P (YpriceChg >= 10% s.t. Ydate between A and B| X Price Chg >= 20%)?
€¦ Like given a price change of X percent or greater, predict the probability of a price change of Y percent or greater, within a specified time window (like 2 days, 3 months etc.). 
I also want to add a support filter, like:
N > 30 cases (i.e., there have been at least 10 instances of a 10% or greater price change, for the chosen time window)
I have a database of prices, monthly, daily, etc.  I also have a number of cols that compute statistics such as pChg1M, pChg-1M, vChg1d.  Like price chg 1 month forward, price change 1 month backward, volumeChg1d forward.  Ideally, I would like to minimize the column flags necessary for the experiment.  Can you offer some hints, as far as setting up appropriate columns/flags and choosing a algorithm (maybe decision trees, association rules, or NB)?  

View Replies !   View Related
The Logic Of Sample Notification Service(Stock)
 hi allin the sample of sqlserver2005(notification service(stock))this is code sample in :appADF.xml(stock) -------------------------- --       Update value in the chronicle if event price greater than value in the chronicle                        UPDATE    StockEventsChron                        SET        StockPrice = E.StockPrice                        FROM    StockEvents E, StockEventsChron C                        WHERE    E.StockSymbol = C.StockSymbol AND E.StockPrice &gt; C.StockPrice.for scenario: +  the first SubscriberId(Stephanie)  set :StockTriggerValue=20, and stockPrice changge =50  -> one notification for Stephanie and in the table StockEventsChron the value field :StockPrice = 50,  + the next :  stockPrice changge  = 25. the field value StockPrice  of table StockEventsChron is still 50 +  then second  SubscriberId(Scott) set StockTriggerValue=30 but---------------- Insert Into StockNotifications    (    S.SubscriberId,                        S.DeviceName,                        S.SubscriberLocale,                        E.StockSymbol,                        E.StockPrice                        )                        SELECT                                S.SubscriberId,                        S.DeviceName,                        S.SubscriberLocale,                        E.StockSymbol,                        E.StockPrice                        FROM   StockSubscriptions S JOIN StockEvents E                        ON   S.StockSymbol = E.StockSymbol                        LEFT OUTER JOIN StockEventsChron c                        ON   S.StockSymbol = c.StockSymbol                        WHERE  S.StockTriggerValue &lt;= E.StockPrice                        AND    (S.StockTriggerValue &gt; c.StockPrice OR c.StockPrice IS NULL)   here :StockTriggerValue=30 &lt; c.StockPrice=50 so no notification for Scott,  why ?can anyone help me?   

View Replies !   View Related
Urgent Stock Options/org Chart Query
Okay, here's an algorithm question for you TSQL gurus out there...

Due to circumstances beyond our control, our group has been tasked with a massive project and a very short timeline. And of course, timely completion is needed because our STOCK OPTIONS grants depend on this! And of course board meetings are always scheduled sooner than you expect.

Here's one of the killer questions we're trying to solve...

Given a table of employee ID's, associated supervisor ID's, and the amount of stock options given, how would you write a stored procedure to return, for any branch of the organizational tree, the sum of all the stock options in a particular branch?


1 2 100
2 30 500
3 2 150
30 50 1000
50 60 5000

What we need is something like : "sp_StockOptionsPerDepartment @SUPERVISORID=30"
with a result : "1750".

Basically we're building an organizational chart of our company from this table, on the fly, and also counting up for certain branches of the org chart, the total stock options.

If a manager has two managers under him, and each sub-manager has three employees, then we want to know the total stock options that all 3+3+2+1 = 9 people possess. Basically it's the total pool of stock options for a department, or work group, or division, etc.

Got this to work for a small set of employees, but when we begin to scale up to entire departments, the query times out because it takes tooooo long...

Any ideas? ANY ideas at ALL would be helpful...

(1) This is basically a tree-traversal algorithm, but conversion into SQL is not always so straightforward. Starting from an arbitrary root node, we must visit every child node underneath, walking all the way down to the leaves.

(2) We tried a brute force algorithm which is fast for smaller sets, but impossibly long for sets where we're dealing with hundreds of employees. Any cheats? Caching results as we go? Any ideas out there?


View Replies !   View Related
What's Differences In CLSID, PROGID, Stock Moniker And Creation Name?
Dear Experts,

when I define a component with IDTSComponentMetaData90 , must choose the type of component, for example DerivedColumn.

I can individualize it with:

Stock Moniker
Creation Name

Can you give me a definition of these identifications? 

what differences are there in these identifications?


thanks a lot




View Replies !   View Related
SSRS :Generate Live Data Report (Example Stock)
I have requirement to cache report server as soon as data get refreshed in datbase.My database get refreshed every 10 minutes.
I am working in stock and bond domain were data changes very frequently.My user want to see almost live data whenever accessing report in report manager.they also want to cache some data for better performance.Can any one tell me step's to improve performance of reporting services .
Kindly suggest me.
Monika Singh

View Replies !   View Related
Shopping Cart, How Do I Subtract The Quantity Purchased From The Stock In Database?
Im making a shopping cart website for a school project in with VB. I need help subtracting the quantity purchased (its saved in a session) from the stock number saved in a database.I know this:UPDATE inventory SET stock = stock - <quantity_purchased> WHERE id = <inventory_id>But I dont understand how to get the quantity purchased from the session to <quantity_purchased>. I tried putting the name of the session there and I got an error, i tried saving the session into a dim didnt work either.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [stock] FROM [product]" InsertCommand="INSERT INTO [product] ([stock]) VALUES (@stock)" UpdateCommand="UPDATE product SET stock = (stock - @Quantity) WHERE (productID = @productID)">
<asp:Parameter Name="stock" Type="Int16" />
<asp:SessionParameter Name="Quantity" SessionField="Quantity" Type="Int32" />
<asp:SessionParameter Name="productID" SessionField="productID" Type="Int32" />
 and I have than in my VB code on submit : SqlDataSource1.Update()

View Replies !   View Related
Issue With SSRS Report Exporting To Excel With The Matrix Control Inside The Table Control
Hi All,
         I am placing a Matrix inside the table control  for grouping requirements,but when we export the report to the Excel, the contents inside the table cell are ignored. Is there any way to get the full report exported, as per the Requirement.Please help me with this issue.
With Thanks

View Replies !   View Related
An Error Has Occurred Because A Control With Id 'ctl162$ctl00$ctl03$ctl01' Could Not Be Located Or A Different Control Is Assign

I am getting the above error while running the report in the production server. I didn't got this error when I ran teh report in the report in test and UAT environment. Please anyone can help me on this issue.
Also when I am trying to run the report for the first time I can view the report, but again when I am trying to re-open the same reprot I am getting the above error. Please let me know.

View Replies !   View Related
Is It Possible To Embbed And Ocx Control On A Report Or Some Sort Of Interactive Control Like A Flash.ocx?
does any one have and example of how to embedd a flash swf file onto a report.??? Is it possable? any examples would be helpful.

View Replies !   View Related
Item Master And Office Stock Details (was &"Query Problem&")

I am having problem in getting result out of two table, one table is Item Mater which stores global items for all offices and other is stock file which stores office wise stock items as follows:

1 A
2 B
3 C
4 D
5 E

1 1 1
2 2 1
3 3 1
4 1 2
5 2 2
6 4 2
7 5 3

I want office wise stock details which inludes items found in stock file and remaining itmes from item master. example for office 1

1 A 1
2 B 1
3 C 1

i want a single view from which i can select data like i shown above, any kind of help is highly appriciated, what i tried is , i created union of both tables and tried to get data out of union view but result is not up to desire.

Thanks in advance

View Replies !   View Related
Developing Custom Components By Extending The SSIS Stock Data Flow Components
Everything I've read says that custom data flow components are built by inheriting from the Microsoft.SqlServer.Dts.Pipeline.PipelineComponent class.

But the stock components such as the Derived Column data flow transformation must each be implemented by their own class.  So how do I base my custom components on those classes?  The documentation for the PipelineComponent class doesn't list any such subclasses.

View Replies !   View Related
Convert Tick-by-tick Stock Price Time Series Data Grouped As High, Low, Open And Close Prices
I am working on a stock price analysis project. Stock prices are stored in SQL Server as tick by tick data (that means in a high frequency) and need to be grouped by minutes in order to display them as as high, low, open and close prices in a candlestick or similar chart.

The fields in the table are: 

Time (for every stock price tick)
Price (stock price)
Symbol (of the stock)

A sample time series would look like this:

11:45:01  $22.11   MSFT
11:45:02  $22.10   MSFT
11:45:04  $22.25   MSFT
11:45:58  $22.45   MSFT
11:46:03  $22.22   MSFT
11:46:08  $22.25   MSFT
11:46:59  $22.45   MSFT

The result of the SQL query should be:

Symbol  Time    Open     High      Low       Close  
MSFT    11:45   $22.11  $22.45  $22.10   $22.45
MSFT    11:46   $22.22  $22.45  $22.22   $22.45 

This is the SQL statement I came up with but obviously doesn't work:

SELECT DATEPART(Minute,Time), MIN(Price), MAX(Price) FROM dbo.TimeSales  WHERE Symbol='MSFT' GROUP BY DATEPART(Minute,Time)

I would appreciate any suggestions.

Thank you!


View Replies !   View Related
Reporting Services From WebBrowser Control - Print = &&"unable To Load Client Print Control&&"
UPDATE #2: When it said "Do you want to install Microsoft SQL Server" I said "yes" and that caused it to work. I exited and re-ran and now the print runs w/o the "install SQL Server" (If the prompt had said "Do you want to install the print dialog" we wouldn't be having this discussion...) 

UPDATE: After posting this i discovered that the same thing occurs when attempting to print the report direct from IE6: First a dialog pops up "Do you want to install this software?" Name: Microsoft SQL Server. When I click "Don't Install" I get the dialog "unable to load client print control." Since this happens direct from IE6 I suspect it's browser settings. I'll resume tomorrow and post a followup.

My WinForm C# app integrates Reporting Services by calling them from WebBrowser controls. The problem is attempts to print cause a dialog: "unable to load client print control."

I've read prior posts that say "enable Active-X in your browser" - I don't know how to do that from a WebBrowser control.

Any ideas how to support Reporting Services "Print" from within a WebBrowser control?




View Replies !   View Related
Question About Procedures To Create Procedures In A Different Database
I'm trying to write a procedure that having created a new database,will then create within that new database all the tables andprocedures that go with it.In doing this I'm hitting the problem that you can't issue a USEcommand within a procedure.So my question is either- how do I get around this?- if I can't, how can I create procedures etc in a *different*(i.e. the newly created) databaseor- is there a better way to do all this (*)I have SQL files that do this currently, but I need to edit in thename of the database each time before execution, so I thought aprocedure would be better. Also I'd like eventually to expose someof this functionality via a web interface.Although I'm a newbie, I feel I'm diving in the deep end. Any goodpointers to all the issues involved in this aspect of databasemanagement would be appreciated.(*) One thought that occurs to me is to have a "template" database,and to then somehow copy all procedures, tables, view etc from that.--HTML-to-text and markup removal with Detagger

View Replies !   View Related
All My Stored Procedures Are Getting Created As System Procedures!

Using SQL 2005, SP2.  All of a sudden, whenever I create any stored procedures in the master database, they get created as system stored procedures.  Doesn't matter what I name them, and what they do. 
For example, even this simple little guy:





Gets created as a system stored procedure.
Any ideas what would cause that and/or how to fix it?

View Replies !   View Related
Oracle Stored Procedures VERSUS SQL Server Stored Procedures
I want to know the differences between SQL Server 2000 storedprocedures and oracle stored procedures? Do they have differentsyntax? The concept should be the same that the stored proceduresexecute in the database server with better performance?Please advise good references for Oracle stored procedures also.thanks!!

View Replies !   View Related
OLE DB Source Task In The Second Control Flow Data Task Fails After The Same Task Succeeds In The First Control Flow Data Task
I am trying to run a SSIS package as an agent job. 
The package has several control flow data tasks. Each of the control flow data tasks uses a OLEDB source task to connect to the same SQL 2005 database(defined by a single connection manager) using SQL server authentication and basically pulls some data.
The first control flow data task succeeds, but the second one fails and so he package errors out.
My question is why would the second OLEDB task be failing when it uses the same connection manager as the frist one?
Here are some facts
   1) the package runs fine in BIDS from my development wkstation.
   2) the package uses an XML configuration file which specifies the sql server password and connectionstring
   3) the package runs on a 64 bit sql server box with SP1.
   4) the job is running under sql agent service account.
   5) I created the package as well as the agent job.
   6) the ole db source is a sql 2005 server.
   7) the error message generated by the second task(oledb source) is
       "The AcquireConnection method call to the connection manager "Source" failed with error code 0xC0202009."
I have read about some issues running SQL authenticated ssis packages running under job agent but i wonder if this is related.


View Replies !   View Related
Stored Procedures 2005 Vs Stored Procedures 2000


This Might be a really simple thing, however we have just installed SQL server 2005 on a new server, and are having difficulties with the set up of the Store Procedures. Every time we try to modify an existing stored procedure it attempts to save it as an SQL file, unlike in 2000 where it saved it as part of the database itself.


Thank you in advance for any help on this matter


View Replies !   View Related
Job Control(T-SQL)
MS-SQL7 is failing on T-SQL set-up of scheduled job.
-It works when I go into Enterprise Manager, edit the job(change nothing),
and click OK.

Here's the T-SQL Script:
USE msdb
EXEC sp_add_job @job_name = 'Daily', @enabled = 1
EXEC sp_add_jobstep @job_name = 'Daily', @step_name = 'Run the Daily reports',
@subsystem = 'CMDEXEC', @cmdexec_success_code = 1,
@command = 'G:
EXEC sp_add_jobschedule @job_name = 'Daily',
@name = 'Scheduled Daily',
@freq_type = 4, -- daily
@freq_interval = 1,
@active_start_time = 142600

View Replies !   View Related
T-SQL Control Of DTS

I want to be able to alter the filename that my DTS package imports programmactically with a T-SQL stored procedure.

Is this possible, I really dont want to write a VB/COM package just to do this!


View Replies !   View Related
SqlDataSource Control
Hello experts
i have a SqlDataSource Control on my web form. Here is the source for the control
<asp:SqlDataSource ID="sqlSearchDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:DbefomsConnectionString %>"
SelectCommand="SELECT [icon], [file_name], [path] FROM [tblfile] WHERE ([file_name] = @file_name)">
<asp:ControlParameter ControlID="txtSearch" DefaultValue="0" Name="file_name" PropertyName="Text"
Type="String" />
This control displays icon, file_name, path in GridView Control
The problem is How can i store the above field values in an variable.

View Replies !   View Related
Sqldatasource Control
hi friends,
I created sqldatasource control. In select command i written the query like this  "select * form emp" and bounded in grid.How can I change the query for searching the details according the date wise when i click the search button.

View Replies !   View Related
Databinding To An ASP.NET Control
Hi,i have a question, i have a VS2005 and a SQL server 2000 enterprise in my office that i used for web developement,iam new to this, i made a data driven site using some automated controls available in the toolbox, but i need to made some manual process, like i need to make a LABEL show the SUM of specific number fields from my data base, they say i have to make a OLEDB connection using VB, but i don't know how,can you tell me how?Thanks  

View Replies !   View Related
Sqldatasource Control
please explain selectparameters and conflict detection property within sqldatasource control

View Replies !   View Related
Image Control And DB
I wanna know how to retrieve & insert an image from/to a Sql Server database.
using image control or any other control 
I’ve done that with windows form picture box.
As that was explained in MS tutorials  
-------------------------------------------Dim ms As New MemoryStreamPictureBox1.Image.Save(ms, PictureBox1.Image.RawFormat)Dim arrImage() As Byte = ms.GetBuffer
ms.Close()   Dim strSQL As String = _            "INSERT INTO Emp (EmpName,EmpSalary,Picture)" & _            "VALUES (@EmpName,@EmpSalary,@Picture)"  Dim cmd As New SqlCommand(strSQL, ConnEmp) With cmd     .Parameters.Add(New SqlParameter("@Picture", _      SqlDbType.Image)).Value = arrImage       .Parameters.Add(New SqlParameter("@EmpName", _       SqlDbType.NVarChar)).Value = txtEmpName.Text        .Parameters.Add(New SqlParameter("@EmpSalary", _        SqlDbType.Decimal)).Value = txtEmpSalary.Text   End With 
But with a web form’s image control I DO NOT know how to do it    
I real appreciate your help 
Thank you

View Replies !   View Related
Why The Control ID Appear 2 Time??
 Hi Sir

I face a very odd situation is when I try use ‘Add WHERE
Clause’ function which in the SQLdataControl – data control configuration. After
I fill the Column (=Doc_ID), Operation (filling ‘=’) and Source (= Control),
and when dropdown to choose Control ID
in parameter properties, it appear 2 Detail View1, 2 DropDownList1, and 2
lblChooseDoctor. Can I know why the control ID appear 2 time?? and how to fix

Ya, forgot to tell you that I had install SQL Server 2000 and
SQL Server 2005 Express. The reason I install the about both SQLServer, is it
because cannot work while I just install the SQL Server 2005 Express, it display
message ’Cannot connect to SQL Server 2005’.So, I think to install back the SQL
Server 2000 and use the Services Manager in Server 2000 to start the database. It’s
the cause for this duplicate control appearance? Or it’s SQL Server 2005
Express got the function to startup the database server, Or How to set the SQL
Server 2005 Express to make visual studio access to it??Thanks!RegardMiker9110  


View Replies !   View Related
.sql Control String
My development environment includes Visual Web Developer, SQL Server 2005 Express and SQL Server Management Studio Express.  I have a .sql control string that creates a database.  The control string is in my App_Data folder within my web site.  When I use SQL Server Managment Studio Express to run the .sql control string and create the tables etc. it does it in my SQLEXPRESS folder and not in the web.
How do I run the .sql file so it will create the database in my App_Data folder within the web site?

View Replies !   View Related
FileUpload Control And MS SQL
I am trying to use the FileUpload control to save a filename to a SQL database. I'm using the OnUpdating event for my SQLDataSource to add the filename to the UpdateParameters. The OnUpdating event is firing but the FileName doesn't get added to the database. Any pointers as to why that might be would be very helpful.
Here's the code. Thanks much.
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="File Upload Testing" %>
<script runat="server">
Sub Page_Load()
Response.Write("UpdateParameters(0)=" & dsLabel.UpdateParameters(0).Name & "<br />")
Response.Write("UpdateParameters(1)=" & dsLabel.UpdateParameters(1).Name & "<br />")
End Sub

Sub dsLabel_OnUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs)
Dim FileUploadControl As FileUpload = DetailsView1.FindControl("FileUpload1")
Dim strFileName As String = FileUploadControl.FileName
dsLabel.UpdateParameters(0).DefaultValue = strFileName
dsLabel.UpdateParameters(1).DefaultValue = Request.QueryString("rgstnID")
Response.Write("dsLabel.UpdateParameters(0).DefaultValue = " & dsLabel.UpdateParameters(0).DefaultValue & "<br />")
Response.Write("dsLabel.UpdateParameters(1).DefaultValue = " & dsLabel.UpdateParameters(1).DefaultValue & "<br />")
End Sub
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h1>File Upload</h1>
This page should allow me to use the FileUpload Control to save a filename to an MS SQL Database.<br />
<br />
&nbsp;<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False"
DataSourceID="dsLabel" Height="50px" Width="125px">
<asp:TemplateField HeaderText="File" SortExpression="labelName">
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Label ID="Label1" runat="server" Text='<%# Bind("labelName") %>'></asp:Label>
<asp:CommandField ButtonType="Button" ShowEditButton="True" />
<br />
<br />
<asp:SqlDataSource ID="dsLabel" runat="server"
ConnectionString="Data Source=FILESERVER1;Initial Catalog=IM;Integrated Security=True"
SelectCommand="SELECT labelName FROM tblProductRegistration WHERE (registrationID = @registrationID)"
UpdateCommand="UPDATE tblProductRegistration SET labelName = @LabelName WHERE (registrationID = @registrationID)">
<asp:Parameter ConvertEmptyStringToNull="True" Name="LabelName" />
<asp:QueryStringParameter Type="Int64" Name="registrationID" QueryStringField="rgstnID" />
<asp:QueryStringParameter Name="registrationID" QueryStringField="rgstnID" />

View Replies !   View Related
DetailsView Control (Please Help!!!!)
Can someone please tell me what I am doing wrong...
I have a simple webform that has contains a GridView and a DetailsView. Once the GridView is populated the user simply selects a record from the list.  The DetailsView is them populated with all of the data from the selected record.
The DetailsView is bound to a SQL DataSource/CustomerData. I have made sure that the DV control has the Edit/Update Command listed.  The user can click the Edit button and successfully edit the fields but when the user clicks the "Update" button I am getting the following message.
Updating is not supported by data source 'CustomerData' unless UpdateCommand is specified
Why isnt the control handling the Update.
Many Thanks!!!!

View Replies !   View Related
Control Parameter Help......
I'm writing a page to do some reporting off of one of our databases, and I'm using 3 control parameters for my sql query that feeds my datagrid.  2 of the ControlParameters are from dropdownlists, and one is from a RadioButtonList.  The ControlParameters that reference the dropdownlists are both working well, but the one for the RadioButtonList is not. 
The error I am getting is: Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '@Booga'.  (I changed my ControlParameter name from DateStr to Booga to try to avoid any conflicts with reserved words.)Any ideas?  Here is a snippet of my code:
<form id="form1" runat="server">
<table width="100%">
<td style="text-align: center">
<td style="text-align: center">
<strong>Time Scope</strong></td>
<td style="text-align: center">
<strong>Call Status</strong></td>
<td style="height: 47px; text-align: center">
<asp:DropDownList ID="DropDownList1" DataSourceID="SqlDataSource2" AutoPostBack="true" DataTextField="LocationName" runat="server" />
<td style="height: 47px; text-align: center">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" Font-Size="Smaller">
<asp:ListItem Selected="True" Value=" 1 = 1 ">All</asp:ListItem>
<asp:ListItem Value="((CAST(CallLog.RecvdDate AS smalldatetime) + 1) >= (CAST(GETDATE() AS smalldatetime)))">Last Day</asp:ListItem>
<asp:ListItem Value="((CAST(CallLog.RecvdDate AS smalldatetime) + 7) >= (CAST(GETDATE() AS smalldatetime)))">Last Week</asp:ListItem>
<asp:ListItem Value="((CAST(CallLog.RecvdDate AS smalldatetime) + 30) >= (CAST(GETDATE() AS smalldatetime)))">Last 30 Days</asp:ListItem>
<asp:ListItem Value="((CAST(CallLog.RecvdDate AS smalldatetime) + 120) >= (CAST(GETDATE() AS smalldatetime)))">Last 120 Days</asp:ListItem>
<td style="height: 47px; text-align: center">
<asp:DropDownList ID="DropDownList2" AutoPostBack="true" runat="server">
<asp:ListItem Selected="True" Value="Open">Open</asp:ListItem>
<asp:ListItem Value="Closed">Closed</asp:ListItem>
<br />
<p style="text-align: center"><strong>Displaying All Open Tickets</strong><br /></p>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" SelectCommand="SELECT DISTINCT [locationname] FROM [profile]"
ConnectionString="<%$ ConnectionStrings:Heat %>" />
<table width="100%">
<tr width="100%">
<td valign="top" width="100%">
<asp:GridView ID="GridView1" AllowSorting="True" runat="server"
DataSourceID="SqlDataSource1" DataKeyNames="CallID"
AutoGenerateColumns="False" Font-Size="Smaller" Width="100%" >
<asp:CommandField />
<asp:BoundField DataField="CallID" HeaderText="Call ID" ReadOnly="True" SortExpression="CallID" />
<asp:BoundField DataField="CustID" HeaderText="Customer ID" ReadOnly="True" SortExpression="CustID" />
<asp:BoundField DataField="CallType" HeaderText="Call Type" ReadOnly="True" SortExpression="CallType" />
<asp:BoundField DataField="Priority" HeaderText="Priority" ReadOnly="True" SortExpression="Priority" />
<asp:BoundField DataField="Cause" HeaderText="Cause" ReadOnly="True" SortExpression="Cause" />
<asp:BoundField DataField="CallDesc" HeaderText="Call Description" ReadOnly="True" SortExpression="CallDesc" >
<ItemStyle Width=40% />
<asp:BoundField DataField="RecvdBy" HeaderText="Received By" ReadOnly="True" SortExpression="RecvdBy" />
<asp:BoundField DataField="RecvdDate" HeaderText="Call Date" ReadOnly="True" SortExpression="RecvdDate" >
<ItemStyle Wrap="False" />
<asp:BoundField DataField="RecvdTime" HeaderText="Call Time" ReadOnly="True" SortExpression="RecvdTime" >
<ItemStyle Wrap="False" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="SELECT * FROM CallLog INNER JOIN Profile ON CallLog.CustID = Profile.CustID WHERE (Profile.LocationName = @LocationName) AND (CallLog.CallStatus = @CallStatus) AND @Booga "
ConnectionString="<%$ ConnectionStrings:Heat %>">
<asp:ControlParameter ControlID="DropDownList1" Name="LocationName" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="CallStatus" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="RadioButtonList1" Name="Booga" PropertyName="SelectedValue" Type="String" />
<br />
<br />
<br />
<br />

View Replies !   View Related
Using The Sqldatasource Control
Do you have to use the sqldatasource in conjuction with another control like gridview or dropdown list?
I'd like to check to see if a record exists in one table before inserting data into another.

View Replies !   View Related
SqlDataSource Control
Hello.I'm new to ASP.NET and trying to write data to a Microsft SQL Server. I have created a SqlDataSource control, which is 'connected' to my SQL server.Now my question is how i can put data in the database throw the control, and read data from it. I've read the site, but it's still unclear for me..Greetings!

View Replies !   View Related
SQLConnection Control
If i use the TimeTracker app from the starter kit suite and I enter my SQL connection in the web.config file it works fine,
If i build a simple app with just a sqladapter, sqlconnection and dataset control then enter in the page_load procedure
It keeps giving my errors see below:  I created a connection with the sqlconnection control and used the same userid and password I used in the time tracker stater kit's web config file which works - I have no idea what is going on
*** is it better to create the sqlconnection control first then create the sqladapter or vise versa.
Server Error in '/WebApplication2' Application.

Login failed for user 'IssueTrackerUser'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'IssueTrackerUser'.Source Error:

Line 55: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 56: 'Put user code to initialize the page here
Line 57: SqlDataAdapter1.Fill(DataSet11)
Line 58: DataGrid1.DataBind()
Line 59: Source File: c:inetpubwwwrootWebApplication2WebForm1.aspx.vb    Line: 57 Stack Trace:

[SqlException: Login failed for user 'IssueTrackerUser'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
WebApplication2.WebForm1.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootWebApplication2WebForm1.aspx.vb:57
System.Web.UI.Control.OnLoad(EventArgs e)

Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

View Replies !   View Related
Concurrency Control
Hi! I'm building a web application with ASP.NET, and using MS SQL 2000 for my database server.
How should I do to guarantee the integrity of the data in spite of the concurrent access? Meaning... how can I make sure that more than 1 user can update 1 table at the same time, while no error will occur? Do I need to add some codes at my aspx file? Or do I need to do something to my database? Or do I not have to worry about it?
Thank you.

View Replies !   View Related
CountrySelector Control
Hello allI am developing a CountrySelector control (which I would like to sharewith anyone), but I am quite a newby in this custom control area.You can find it at: questions I have are:- In what event should the items be added. In this case (PreRender)items added on every render (duh) and get duplicated when ViewState isenabled. Best would be if the items show up in the designer alreadybut only in designmode and not with <ListItem> in the HTML source.- How can I override ViewState get/set methods to only save thecurrent selection and not the whole collection? It will also need tosave whether it is the first render (for the use of the DefaultCountryproperty)- What behaviour to expect when an invalid countrycode is selected byconsuming (.net) code (e.g. in the DefaultCountry property)?- Is it possible to use System.Globalization to populate thecollection with country(code)'s?Thank you in advance.Hope to hear from youFreek VersteijnHere is the concept code:Imports System.ComponentModelImports System.Web.UIImports System.Web.UI.WebControls<ToolboxData("<{0}:CountrySelectorrunat=server></{0}:CountrySelector>")> Public Class CountrySelectorInherits System.Web.UI.WebControls.DropDownListProtected _DefaultCountry As String<Description("The initial country's code")> _Public Property DefaultCountry() As StringGetReturn _DefaultCountryEnd GetSet(ByVal Value As String)_DefaultCountry = ("" & Value).ToUpper()End SetEnd Property'TODO:' [ ] Move adding of items to other method?' [ ] Show DefaultCountry at first render' [ ] ViewState to only save the selected item' [ ] Use System.Globalization (RegionInfo.DisplayName or..EnglishName depending on CurrentCulture) for populating the Itemscollection if possibleProtected Overrides Sub OnPreRender(ByVal e As EventArgs)Items.Add(New ListItem("Albania", "AL"))Items.Add(New ListItem("Algeria", "DZ"))Items.Add(New ListItem("American Samoa", "AS"))Items.Add(New ListItem("Andorra", "AD"))Items.Add(New ListItem("Angola", "AO"))Items.Add(New ListItem("Anguilla", "AI"))Items.Add(New ListItem("Antarctica", "AQ"))Items.Add(New ListItem("Antigua/Barbuda", "AG"))Items.Add(New ListItem("Argentina", "AR"))Items.Add(New ListItem("Armenia", "AM"))Items.Add(New ListItem("Aruba", "AW"))Items.Add(New ListItem("Australia", "AU"))Items.Add(New ListItem("Austria", "AT"))Items.Add(New ListItem("Azerbaijan", "AZ"))Items.Add(New ListItem("Bahamas", "BS"))Items.Add(New ListItem("Bahrain", "BH"))Items.Add(New ListItem("Bangladesh", "BD"))Items.Add(New ListItem("Barbados", "BB"))Items.Add(New ListItem("Belarus", "BY"))Items.Add(New ListItem("Belgium", "BE"))Items.Add(New ListItem("Belize", "BZ"))Items.Add(New ListItem("Benin", "BJ"))Items.Add(New ListItem("Bermuda", "BM"))Items.Add(New ListItem("Bhutan", "BT"))Items.Add(New ListItem("Bolivia", "BO"))Items.Add(New ListItem("Bosnia", "BA"))Items.Add(New ListItem("Botswana", "BW"))Items.Add(New ListItem("Bouvet Island", "BV"))Items.Add(New ListItem("Brazil", "BR"))Items.Add(New ListItem("British Indian Ocean Territory","IO"))Items.Add(New ListItem("British West Indies", "WI"))Items.Add(New ListItem("Brunei Darussalam", "BN"))Items.Add(New ListItem("Bulgaria", "BG"))Items.Add(New ListItem("Burkina Faso", "BF"))Items.Add(New ListItem("Burma", "BU"))Items.Add(New ListItem("Burundi", "BI"))Items.Add(New ListItem("Cambodia", "KH"))Items.Add(New ListItem("Cameroon", "CM"))Items.Add(New ListItem("Canada", "CA"))Items.Add(New ListItem("Cape Verde", "CV"))Items.Add(New ListItem("Cayman Islands", "KY"))Items.Add(New ListItem("Central Africa", "CF"))Items.Add(New ListItem("Chad", "TD"))Items.Add(New ListItem("Chile", "CL"))Items.Add(New ListItem("China", "CN"))Items.Add(New ListItem("Christmas Island", "CX"))Items.Add(New ListItem("Cocos (Keeling) Islands", "CC"))Items.Add(New ListItem("Colombia", "CO"))Items.Add(New ListItem("Comoros", "KM"))Items.Add(New ListItem("Congo", "CG"))Items.Add(New ListItem("Cook Islands", "CK"))Items.Add(New ListItem("Costa Rica", "CR"))Items.Add(New ListItem("Cote D'Ivoire", "CI"))Items.Add(New ListItem("Croatia", "HR"))Items.Add(New ListItem("Cuba", "CU"))Items.Add(New ListItem("Cyprus", "CY"))Items.Add(New ListItem("Czech Republic", "CZ"))Items.Add(New ListItem("Denmark", "DK"))Items.Add(New ListItem("Djibouti", "DJ"))Items.Add(New ListItem("Dominica", "DM"))Items.Add(New ListItem("Dominican Republic", "DO"))Items.Add(New ListItem("East Timor", "TP"))Items.Add(New ListItem("Ecuador", "EC"))Items.Add(New ListItem("Egypt", "EG"))Items.Add(New ListItem("El Salvador", "SV"))Items.Add(New ListItem("Equatorial Guinea", "GQ"))Items.Add(New ListItem("Eritrea", "ER"))Items.Add(New ListItem("Estonia", "EE"))Items.Add(New ListItem("Ethiopia", "ET"))Items.Add(New ListItem("Faeroe Islands", "FO"))Items.Add(New ListItem("Falkland Islands", "FK"))Items.Add(New ListItem("Fiji", "FJ"))Items.Add(New ListItem("Finland", "FI"))Items.Add(New ListItem("France", "FR"))Items.Add(New ListItem("French Polynesia", "PF"))Items.Add(New ListItem("French Southern Territories", "TF"))Items.Add(New ListItem("Gabon", "GA"))Items.Add(New ListItem("Gambia", "GM"))Items.Add(New ListItem("Gaza", "XA"))Items.Add(New ListItem("Georgia", "GE"))Items.Add(New ListItem("Germany", "DE"))Items.Add(New ListItem("Ghana", "GH"))Items.Add(New ListItem("Gibraltar", "GI"))Items.Add(New ListItem("Greece", "GR"))Items.Add(New ListItem("Greenland", "GL"))Items.Add(New ListItem("Grenada", "GD"))Items.Add(New ListItem("Guadeloupe", "GP"))Items.Add(New ListItem("Guam", "GU"))Items.Add(New ListItem("Guatemala", "GT"))Items.Add(New ListItem("Guiana", "GF"))Items.Add(New ListItem("Guinea", "GN"))Items.Add(New ListItem("Guinea-Bissau", "GW"))Items.Add(New ListItem("Guyana", "GY"))Items.Add(New ListItem("Haiti", "HT"))Items.Add(New ListItem("Heard And Mcdonald Islands", "HM"))Items.Add(New ListItem("Held Territories", "XH"))Items.Add(New ListItem("Honduras", "HN"))Items.Add(New ListItem("Hong Kong", "HK"))Items.Add(New ListItem("Hungary", "HU"))Items.Add(New ListItem("Iceland", "IS"))Items.Add(New ListItem("India", "IN"))Items.Add(New ListItem("Indian Ocean Islands", "XI"))Items.Add(New ListItem("Indonesia", "ID"))Items.Add(New ListItem("Iran", "IN"))Items.Add(New ListItem("Iraq", "IQ"))Items.Add(New ListItem("Ireland", "IE"))Items.Add(New ListItem("Israel", "IL"))Items.Add(New ListItem("Italy", "IT"))Items.Add(New ListItem("Jamaica", "JM"))Items.Add(New ListItem("Japan", "JP"))Items.Add(New ListItem("Jordan", "JO"))Items.Add(New ListItem("Kazakhstan", "KZ"))Items.Add(New ListItem("Kenya", "KE"))Items.Add(New ListItem("Kiribati", "KI"))Items.Add(New ListItem("Korea", "KR"))Items.Add(New ListItem("Kuwait", "KW"))Items.Add(New ListItem("Kyrgyzstan", "KG"))Items.Add(New ListItem("Laos", "LA"))Items.Add(New ListItem("Latvia", "LV"))Items.Add(New ListItem("Lebanon", "LB"))Items.Add(New ListItem("Lesotho", "LS"))Items.Add(New ListItem("Liberia", "LR"))Items.Add(New ListItem("Libya", "LY"))Items.Add(New ListItem("Liechtenstein", "LI"))Items.Add(New ListItem("Lithuania", "LT"))Items.Add(New ListItem("Luxembourg", "LU"))Items.Add(New ListItem("Macau", "MO"))Items.Add(New ListItem("Macedonia", "MK"))Items.Add(New ListItem("Madagascar", "MG"))Items.Add(New ListItem("Malawi", "MW"))Items.Add(New ListItem("Malaysia", "MY"))Items.Add(New ListItem("Maldives", "MV"))Items.Add(New ListItem("Mali", "ML"))Items.Add(New ListItem("Malta", "MT"))Items.Add(New ListItem("Marshall Islands", "MH"))Items.Add(New ListItem("Martinique", "MQ"))Items.Add(New ListItem("Mauritania", "MR"))Items.Add(New ListItem("Mauritius", "MU"))Items.Add(New ListItem("Mayotte", "YT"))Items.Add(New ListItem("Mexico", "MX"))Items.Add(New ListItem("Micronesia", "FM"))Items.Add(New ListItem("Moldova", "MD"))Items.Add(New ListItem("Monaco", "MC"))Items.Add(New ListItem("Mongolia", "MN"))Items.Add(New ListItem("Montserrat", "MS"))Items.Add(New ListItem("Morocco", "MA"))Items.Add(New ListItem("Mozambique", "MZ"))Items.Add(New ListItem("Myanmar", "MM"))Items.Add(New ListItem("Namibia", "NA"))Items.Add(New ListItem("Nauru", "NR"))Items.Add(New ListItem("Nepal", "NP"))Items.Add(New ListItem("Netherlands", "NL"))Items.Add(New ListItem("Netherlands Antilles", "AN"))Items.Add(New ListItem("New Caledonia", "NC"))Items.Add(New ListItem("New Zealand", "NZ"))Items.Add(New ListItem("Nicaragua", "NI"))Items.Add(New ListItem("Niger", "NE"))Items.Add(New ListItem("Nigeria", "NG"))Items.Add(New ListItem("Niue", "NU"))Items.Add(New ListItem("Norfolk Island", "NF"))Items.Add(New ListItem("North Korea", "KP"))Items.Add(New ListItem("Northern Ireland", "XB"))Items.Add(New ListItem("Northern Mariana Islands", "MP"))Items.Add(New ListItem("Norway", "NO"))Items.Add(New ListItem("Oman", "OM"))Items.Add(New ListItem("Pakistan", "PK"))Items.Add(New ListItem("Palau", "PW"))Items.Add(New ListItem("Panama", "PA"))Items.Add(New ListItem("Papua New Guinea", "PG"))Items.Add(New ListItem("Paraguay", "PY"))Items.Add(New ListItem("Peru", "PE"))Items.Add(New ListItem("Philippines", "PH"))Items.Add(New ListItem("Pitcairn", "PN"))Items.Add(New ListItem("Poland", "PL"))Items.Add(New ListItem("Portugal", "PT"))Items.Add(New ListItem("Puerto Rico", "PR"))Items.Add(New ListItem("Qatar", "QA"))Items.Add(New ListItem("Reunion", "RE"))Items.Add(New ListItem("Romania", "RO"))Items.Add(New ListItem("Russia", "RU"))Items.Add(New ListItem("Rwanda", "RW"))Items.Add(New ListItem("Saint Lucia", "LC"))Items.Add(New ListItem("San Marino", "SM"))Items.Add(New ListItem("Sao Tome And Principe", "ST"))Items.Add(New ListItem("Saudi Arabia", "SA"))Items.Add(New ListItem("Scotland", "WY"))Items.Add(New ListItem("Senegal", "SN"))Items.Add(New ListItem("Seychelles", "SC"))Items.Add(New ListItem("Sierra Leone", "SL"))Items.Add(New ListItem("Singapore", "SG"))Items.Add(New ListItem("Slovak Republic", "SK"))Items.Add(New ListItem("Slovenia", "SI"))Items.Add(New ListItem("Solomon Islands", "SB"))Items.Add(New ListItem("Somalia", "SO"))Items.Add(New ListItem("South Africa", "ZA"))Items.Add(New ListItem("South Georgia", "GS"))Items.Add(New ListItem("Spain", "ES"))Items.Add(New ListItem("Sri Lanka", "LK"))Items.Add(New ListItem("St. Helena", "SH"))Items.Add(New ListItem("St. Kitts & Nevis", "KN"))Items.Add(New ListItem("St. Pierre", "PM"))Items.Add(New ListItem("St. Vincent & The Grenadines", "VC"))Items.Add(New ListItem("Sudan", "SD"))Items.Add(New ListItem("Suriname", "SR"))Items.Add(New ListItem("Svalbard And Jan Mayen Islands","SJ"))Items.Add(New ListItem("Swaziland", "SZ"))Items.Add(New ListItem("Sweden", "SE"))Items.Add(New ListItem("Switzerland", "CH"))Items.Add(New ListItem("Syria", "SY"))Items.Add(New ListItem("Taiwan", "TW"))Items.Add(New ListItem("Tajikistan", "TJ"))Items.Add(New ListItem("Tanzania", "TZ"))Items.Add(New ListItem("Thailand", "TH"))Items.Add(New ListItem("Togo", "TG"))Items.Add(New ListItem("Tokelau", "TK"))Items.Add(New ListItem("Tonga", "TO"))Items.Add(New ListItem("Trinidad And Tobago", "TT"))Items.Add(New ListItem("Tunisia", "TN"))Items.Add(New ListItem("Turkey", "TR"))Items.Add(New ListItem("Turkmenistan", "TM"))Items.Add(New ListItem("Turks And Caicos Islands", "TC"))Items.Add(New ListItem("Tuvalu", "TV"))Items.Add(New ListItem("U.S. Minor Outlying Islands", "UM"))Items.Add(New ListItem("U.S.A.", "US"))Items.Add(New ListItem("Uganda", "UG"))Items.Add(New ListItem("Ukraine", "UA"))Items.Add(New ListItem("United Arab Emirates", "AE"))Items.Add(New ListItem("United Kingdom", "GB"))Items.Add(New ListItem("Uruguay", "UY"))Items.Add(New ListItem("Uzbekistan", "UZ"))Items.Add(New ListItem("Vanuatu", "VU"))Items.Add(New ListItem("Vatican City State", "VA"))Items.Add(New ListItem("Venezuela", "VE"))Items.Add(New ListItem("Viet Nam", "VN"))Items.Add(New ListItem("Virgin Islands (British)", "VG"))Items.Add(New ListItem("Virgin Islands (U.S.)", "VI"))Items.Add(New ListItem("Wales", "WX"))Items.Add(New ListItem("Wallis And Futuna Islands", "WF"))Items.Add(New ListItem("Western Sahara", "EH"))Items.Add(New ListItem("Western Samoa", "WS"))Items.Add(New ListItem("Yemen", "YE"))Items.Add(New ListItem("Yugoslavia", "YU"))Items.Add(New ListItem("Zambia", "ZM"))Items.Add(New ListItem("Zimbabwe", "ZW"))MyBase.OnPreRender(e)End SubProtected Overrides Function SaveViewState() As ObjectEnd FunctionProtected Overrides Sub LoadViewState(ByVal savedState As Object)End SubEnd Class

View Replies !   View Related
SQL Code Control
Is anybody aware of how I can audit redundant Stored Procedures [SP] out of a large application. I only have the SQL-Server (no Sourcesafe/CVS). I need to know when an SP was last accessed. There are over seven hundered SPs.

Any help appreciated


View Replies !   View Related
Revision Control
Does SQL 6.5 integrate with visual source safe to provide revision control of your stored procedures and queries? If not, is there a product for controlling revision control on a SQL 6.5 server?

View Replies !   View Related
Revision Control
Does SQL 7 support or integrate with any revision control system? We need to begin to control our stored procedures and triggers and would like to use some form of Revision control system. We are currently using Visual Source Safe for visual fox and asp pages. Can we use this program?

View Replies !   View Related
T-SQL Thread Control
I want to prevent more than one client application calling a stored procedure at any 1 point in time. At the moment I do this using following T-SQL:

create proc etc...

begin tran

select * from table_X with (tablockx) of code.

commit tran

The select statement places exclusive lock on table_X forcing all other calls to this stored procedure to wait until they can claim their own exclusive lock.

Is there a neater way of synchronising threads in T-SQL ??

View Replies !   View Related
Version Control

What is the best method of version control for SQL Server??


View Replies !   View Related

Copyright © 2005-08, All rights reserved