Strange Thing In All Examples At MSDN

Sep 18, 2007

Hi,
I have seen many examples at MSDN library related to SQL Querries in all queries one thing is same the way they use tables in there queries. BUT wht is this really i am not getting this, can anyone tell me.. the code and the problem is as follows:


Code Snippet
FROM Purchasing.ProductVendor JOIN Purchasing.Vendor
ON (ProductVendor.VendorID = Vendor.VendorID)In the above code u see "Purchasing.ProductVendor", I want to ask that wht is this
Purchasing Stands for, If we suppose that purxchasing is the database name then also
normally we use database name as Purchasing.dbo.ProductVendor BUT I am not getting that
what is this,
Please if someone knows then explain it to me,
Thanks.

View 2 Replies


ADVERTISEMENT

The Whole Dbo.thing....

Dec 6, 2007

As a burgeoning SQL developer I have never really understood the need for SQL Server / Enterprise Manager to show us the whole dbo.Table name thing. What is dbo, and why do we need to know deal with it?With that said, in my SQL 2005 Express database all of my project tables for my project management demo were named guard.pgUsers for example and not dbo.pgUsers.How come? Why did they get named different on their own? 

View 2 Replies View Related

I've Done A Very Silly Thing And Need Help

Mar 25, 2003

After being put in a position where I had to deal with a SQL problem without very little SQL knowledge I have screwed a clients main database up.

I backed up the transaction log and then deleted the log. The database is shown as suspect and won't let me restore.

Am I F&%ked?


Any help in sorting this out will be rewarded with much kudos and thanks

View 12 Replies View Related

Group By Thing

Mar 31, 2008

I try to do:

DECLARE
@ThisMinute DateTime,
@ThisDay DateTime

SET@ThisMinute = DATEADD(MINUTE, DATEDIFF(MINUTE, '20000101', CURRENT_TIMESTAMP), '20000101')
SET@ThisDay = DATEADD(DAY, DATEDIFF(DAY, '20000101', CURRENT_TIMESTAMP), '20000101')

SELECT
row_number() over (order by MAX(HeadlineDate)) as Number,
COUNT(ArticleID) AS [Count],
MIN(DATEADD(dd, - (DAY(HeadlineDate) - 1), HeadlineDate)) AS HeadlineDate
FROM
dbo.ZMArticle
WHERE
PortalID=0

GROUP BY
MONTH(HeadlineDate), Year(HeadlineDate)
ORDER BY
MAX(HeadlineDate) desC

Which works fine, but when I do:

DECLARE
@ThisMinute DateTime,
@ThisDay DateTime

SET@ThisMinute = DATEADD(MINUTE, DATEDIFF(MINUTE, '20000101', CURRENT_TIMESTAMP), '20000101')
SET@ThisDay = DATEADD(DAY, DATEDIFF(DAY, '20000101', CURRENT_TIMESTAMP), '20000101')

SELECT
row_number() over (order by MAX(HeadlineDate)) as Number,
COUNT(ArticleID) AS [Count],
MIN(DATEADD(dd, - (DAY(HeadlineDate) - 1), HeadlineDate)) AS HeadlineDate
FROM
dbo.ZMArticle
WHERE
PortalID=0
AND
Expiredate <> Null
GROUP BY
MONTH(HeadlineDate), Year(HeadlineDate)
ORDER BY
MAX(HeadlineDate) desC

it doesn't return anything....

How can I change that


The secret to creativity is knowing how to hide your sources. (Einstein)

View 3 Replies View Related

Is There Such A Thing As Too Many Relationship?

Jul 20, 2005

Hi,I have a corporate database with about 60 different tables that spansmanufacturing, accounting, marketing, etc.It is possible, but unwieldy, to establish a relationship for eachtable in the entire database through critical fields like customer_idor product_id.But should I do that?My question is: Is there such a thing as too many relationships? CanI establish referential integrity via relationships with criticaltables like Accounting, but leave the rest unconnected and simply useJOINS in my business code?Thanks,HC

View 4 Replies View Related

Something Not Right With This Query From Msdn

Sep 20, 2006

I have been trying to straighten out the select statement(underlined) in the procedure below but no luck. It is at the link below:(User-Specific Paging from ASP.NET)http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenethowto05.aspI think the "author" messed up during the copy and paste. Someone please help out. I really need its correct version. Thanks.blumonde // The BindData method constructs a SQL query that uses nested SELECT TOP // statements (as described earlier) to retrieve a specified page of data.//public void BindData(){  SqlConnection myConnection = new SqlConnection(_connStr);  String strCmd = "";  StringBuilder sb = new StringBuilder();  sb.Append("select top {0} CustomerID,CompanyName,ContactName,ContactTitle from (select top {1} CustomerID,CompanyName,ContactName,ContactTitle from Customers ");  sb.Append("as t1 order by contactname desc) ");  sb.Append("as t2 order by contactname asc");  strCmd = sb.ToString();   sb = null;  // Set pseudoparameters: TableName, KeyField and RowIndex   strCmd = String.Format(strCmd, _pageSize, _currentPageNumber * _pageSize);  // Prepare the command  SqlCommand myCommand = new SqlCommand(strCmd,myConnection);  SqlDataAdapter sa = new SqlDataAdapter(myCommand);  DataSet searchData = new DataSet("SearchData");  try  {    myConnection.Open();    sa.Fill(searchData);    MyDataGrid.DataSource = searchData;    MyDataGrid.DataBind();   }  finally  {    myConnection.Close();  }  CurrentPage.Text = _currentPageNumber.ToString();  if ( !Page.IsPostBack )  {    using (SqlConnection conn = new SqlConnection(_connStr))    {      SqlCommand cmd = conn.CreateCommand();      cmd.CommandText = "SELECT Count(*) FROM Customers";      conn.Open();      _totalRecords = (int)cmd.ExecuteScalar();      _totalPages = _totalRecords / MyDataGrid.PageSize;      TotalPages.Text = _totalPages.ToString();    }  }  else  {    _totalPages = int.Parse ( TotalPages.Text );   }  if (_currentPageNumber == 1)  {    PreviousPage.Enabled = false;    if (_totalPages > 1)      NextPage.Enabled = true;    else    NextPage.Enabled = false;  }  else  {    PreviousPage.Enabled = true;    if (_currentPageNumber == _totalPages)      NextPage.Enabled = false;    else      NextPage.Enabled = true;  }}

View 32 Replies View Related

SQL 7 (MSDN Version) And DTS

Mar 22, 1999

Hi

I have installed the MSDN SQL 7.0 final release on 2 Win NT (1 server and 1 Wkst)

When I launch DTS, I CAN export/import ACCESS <--> SQL and vice versa

I CANNOT export/import SQL7 <--> SQL7

I have this error messsage :
"The licence for installation of Microsoft SQL Server
on your source and destination connections does not permit the use
of DTS to transform data. refer to your licence agreement for more
information"

any ideas why ? Is there any limitation with MSDN CD ?

View 1 Replies View Related

MSDN On Vista???

Aug 31, 2007

Hello,

I recently got me a new laptop with Vista preinstalled. All good and well, but when I try to install a program vital for my profession, I get an error (OS not supported for this program). In the install I can configure what components to install, one of them is MSDN 2000. My question is, will SQL Server Express take over what MSDN can't on Vista (and thus running the program needing the MSDN 2000), or will windows XP be the new OS on my brand new laptop in the future. Love Vista, hate the compatibility.

View 1 Replies View Related

Msdn Forum

Mar 14, 2008



Where is the list for forums,
When i started to write for Sqlserver, i never searched or looked for forum. Same did when i was working with the c#.
Now I have to find the correct forum. So where is the list of those forums, thanks.

View 3 Replies View Related

Why 2 RS Forums On MSDN?

Jun 6, 2007

Why are there 2 RS forums on MSDN
This is the other one
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs

This one has a worse UI

View 2 Replies View Related

Is There Such A Thing As Table Name Wildcards?

Jan 8, 2007

Hey all,I have a datagrid with populated by this query: SELECT TABLE_NAME, TABLE_TYPE FROM INFORMATION_SCHEMA.TABLES WHERE (TABLE_TYPE = 'BASE TABLE')I have paging, sorting and selection enabled.Now I am looking for a way to use a wild card as a placeholder for the table name in my select statements so I can use the valued selected from the datagrid.Example : SELECT * FROM %TABLENAME%TIAWOOHOO! my first post. 

View 2 Replies View Related

This Thing Gives Me Scaler Error

May 23, 2008

i got this stored procedure.
i tried to modify it and now its giving me this scaler error.
 
Msg 137, Level 15, State 2, Procedure insertuser, Line 4
Must declare the scalar variable "@seller_id".
 
 USE [DBCars]
GO
/****** Object: StoredProcedure [dbo].[insertuser] Script Date: 05/23/2008 20:44:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[insertuser]
(@Make nchar(10),@Model nchar(10),@City nchar(10),@SellerID varchar(50),@MileAge nchar(10),@Year_Model int)
as
insert into tbcar values(@make,@model,@city,@seller_id,@mileage,@year_model);

View 4 Replies View Related

Are There Such A Thing As Arrays In TSQL?

Feb 10, 2004

I'm have a stored procedure that iterates through a list of numbers and adds an item for each number (user id) some of these ids are duplicates which is fine even necessary for the first part of my query but for the last I need to ensure that no duplicates id's are passed to the stored procedure, in this case called 'spInsertForBackupNote'. My thoughts here was to do something like this:

SET @Note_Buffer = @UserID -- @Note_Buffer being some kind of array?

IF @Note_Buffer = @UserID -- If its been added to the buffer we dont execute sp
BEGIN
Do Nothing here
END

ELSE

BEGIN
EXECUTE spInsertForBackupNote @FK_UserID, @FK_NoteID
END

I know this would never work because it would always be false since I just added the same userid to the buffer that I want to add. But I think you see my problem. I know it should be an easy one but my TSQL is limited. I've posted the whole sp. Hope someone can help.

CREATE PROCEDURE spInsertAssignedNotesByList
@FK_UserIDList NVARCHAR(4000) = NULL,
@FK_NoteIDList NVARCHAR(4000) = NULL,
@By_Who INT,
@UserID INT

AS
SET NOCOUNT ON

DECLARE @Length INT
DECLARE @Note_Length INT
DECLARE @Note_Buffer INT

DECLARE @FirstUserIDWord NVARCHAR(4000)
DECLARE @FirstNoteIDWord NVARCHAR(4000)

DECLARE @FK_UserID INT
DECLARE @FK_NoteID INT

SELECT @Length = DATALENGTH(@FK_UserIDList )
SELECT @Note_Length = DATALENGTH(@FK_NoteIDList )

DECLARE @TempFK_NoteIDList NVARCHAR(4000) --= NULL
DECLARE @Temp_NoteLength INT

SET @TempFK_NoteIDList = @FK_NoteIDList
SET @Temp_NoteLength = DATALENGTH(@FK_NoteIDList )


-- IF @Length > @Note_Length -- If we have more users than notes

BEGIN

WHILE @Length > 0
BEGIN

IF @Length > 0

EXECUTE @Length = PopFirstWord @FK_UserIDList OUTPUT, @FirstUserIDWord OUTPUT
SELECT @FK_UserID = CONVERT(INT, @FirstUserIDWord)

IF @Length > 0
BEGIN

SET @FK_NoteIDList = @TempFK_NoteIDList
SET @Note_Length = @Temp_NoteLength

WHILE @Note_Length > 0
BEGIN
EXECUTE @Note_Length = PopFirstWord @FK_NoteIDList OUTPUT, @FirstNoteIDWord OUTPUT
SELECT @FK_NoteID = CONVERT(INT, @FirstNoteIDWord)

IF @Note_Length > 0
EXECUTE spInsertAssignedNoteDetail @FK_UserID, @FK_NoteID


SET @Note_Buffer = @UserID
EXECUTE spInsertForBackupNote @FK_UserID, @FK_NoteID, @By_Who, @UserID -- NEW HERE
END
END

END
END



--------------------------------------------------
GO

View 6 Replies View Related

Is There Such A Thing As A Variable SUBSTRING?

Nov 27, 2001

I have this field in a table.

NAME
--------------------
Johnson, Bill P.


I need to cut it up into this in another table:


LAST_NAME FIRST_NAME MID_INIT
-----------------------------------------------------
Johnson Bill P


I can't use SUBSTRING command because the length of this field will change with every row.

Is there a way I can tell it to truncate past or prior to the comma or spaces?

Thanks!

Lance

View 2 Replies View Related

Localization In SQL Server- Is There Such A Thing?

Apr 30, 2007

Hello all,
I'm working on an ASP.NET with a SQL server for database. Some of the tables, for example, contain information such as different types of Fabrics (silk, cotton, etc..) . I'd like to have this table localizable (English and French for instance). Is this possible ? Is there an equivalent of resource files in SQL server ?
Or do I have to do this manually ? (have 2 separate fields in the table for those 2 locales)

View 1 Replies View Related

This Should Be The Easist Thing To Do... Have A Counter...

Apr 25, 2007

This should be so easy.

All I want to do is have a cumalative counter that counts from 1 to whatever.



any ideas how i can do this?

View 6 Replies View Related

DTExec Can This Thing Run In The Background?

Sep 24, 2007



I have a DTS Package that I am running from a command line via .bat file. Does anyone know if there is a command to have the command window minimized or running in the background? I used the /Rep N command but that still leaves the window open until the package has executed.

Thanks!

View 3 Replies View Related

One Surprise Thing When Use VarDecimal

Aug 3, 2007

Hi ALl,

When I open the VarDecimal option in our SAP R3P system, I found the space used is increased.

Before turn on the option:
Total space:528315.31MB
Fee Sapce:0.00MB

After trun on the option:
Total Space:733815.31MB
Free Space:119006.31MB

it is very interestion, anyone has this experience?

thanks.

View 4 Replies View Related

How To Do The Same Thing In Mssql As Mysql?

Apr 13, 2006

in MySql:

SELECT * FROM table LIMIT 5,10

How to do this in MicroSoftSql?

View 9 Replies View Related

Problem Running SQL CLR MSDN Example

Oct 16, 2006

Hello,

Using VS 2005 SP1 beta and SQL Server 2005.

I am trying to learn how SQL CLR works by using this example:

http://msdn2.microsoft.com/en-us/library/5czye81z.aspx

When I press F5, I get this error:

A .NET Framework error occurred during execution of user defined routine or aggregate 'InsertCurrency':

System.Data.SqlClient.SqlException: Must declare the scalar variable "@CurrencyCode".

Do I need to declare @CurrencyCode in the Test.sql script?

Thanks for any suggestions,

Tom

View 7 Replies View Related

Limitations To The MSDN Vs Of SQL 2000?

Feb 2, 2007

Are there any limits to the number of user that can connect or anything like that with SQL 2000 (MSDN Vs)?

Thanks!

View 1 Replies View Related

XML And DTS Examples

Feb 18, 2002

Are there any examples of using DTS and XML/XLS? specifically, importing data. I have searched through BOL and cant find any, nor is there any reference to XML in the book "Professional SQL 2000 DTS"

Many thanks

View 2 Replies View Related

Examples

Jul 20, 2005

I see a lot of example, but where do these example procedures go. Likedeclare (whatever)?below is an example i read. Where do you put this to make it execute, is itthe view screen or the stored procedure screen?I'm using MSDE now to learn, and I can't get nothing working except simpleselect query statements.In the northwind example (northwindcs), how would I do a parameter querylike this:Have a dialog box ask user to enter customerid to bring up. (in a query nownot a form)Also, how would you check if a certain customerid exist? Example, CHOPS isone customerid. If I wanted to use a query to check if it exist, and returnno records, but just do an action (like add a record) if it didn't exist,how?[color=blue]> CPU SQL> (ms)> -- Convert to varchar (implicitly) and compare right two digits> -- (original version -- no I didn't write it)> 4546 select sum(case right(srp,2)> when '99' then 1 when '49' then 1 else 0 end)> from sf>> -- Use LIKE for a single comparison instead of two, much faster> -- Note that the big speedup indicates that> -- CASE expr WHEN y then a WHEN z then b .> -- recalculates expr for each WHEN clause> 2023 select sum(case when srp like '%[49]9' then 1 else 0 end)> from sf[/color]I tried some variations of this, and indeed it seems that there is a costwhen the expression appears with several WITH clauses. I tried a variationof this, where I supplemented the test table with a char(2) column, so Icould factor out that the WITH clauses themselves were not the culprits.CREATE TABLE realthing (realta real NOT NULL,lasttwo char(2) NOT NULL)goINSERT realthing (realta, lasttwo)SELECT r, right(r, 2)FROM (SELECT r = convert(real, checksum(newid()))FROM Northwind..Orders aCROSS JOIN Northwind..Orders b) AS fgoDBCC DROPCLEANBUFFERSgoDECLARE @start datetimeSELECT @start = getdate()SELECT SUM(CASE right(realta, 2)WHEN '99' THEN 1WHEN '49' THEN 1WHEN '39' THEN 1ELSE 0 END)FROM realthingSELECT datediff(ms, @start, getdate()) -- 20766 ms.goDBCC DROPCLEANBUFFERSgoDECLARE @start datetimeSELECT @start = getdate()SELECT SUM(CASE WHEN right(realta, 2) LIKE '[349]9' THEN 1 ELSE 0 END)FROM realthingSELECT datediff(ms, @start, getdate()) -- 8406 ms.goDBCC DROPCLEANBUFFERSgoDECLARE @start datetimeSELECT @start = getdate()SELECT SUM(CASE lasttwoWHEN '99' THEN 1WHEN '49' THEN 1WHEN '39' THEN 1ELSE 0 END)FROM realthingSELECT datediff(ms, @start, getdate()) -- 920 ms.goDBCC DROPCLEANBUFFERSgoDECLARE @start datetimeSELECT @start = getdate()SELECT SUM(CASE WHEN lasttwo LIKE '[349]9' THEN 1 ELSE 0 END)FROM realthingSELECT datediff(ms, @start, getdate()) -- 1466 ms.Thus, when using the char(2) column LIKE is slower despite that thereis only one WHEN condition. So indeed it seems that right(realta, 2)is computed thrice in the first test.Another funny thing is the actual results from the queries - they aredifferent. When I ran:select count(*) from realthing where lasttwo <> right(realta, 2)The result was about half of the size of realthing! I can't see thatthis difference affects the results though.Now, your article had a lot more tests, but I have to confess thatyou lost me quite early, because you never discussed what is theactual problem. Since you are working with floating-poiont numbersthere is a great risk that different methods not only has differentexecution times, but also gives different results.--Erland Sommarskog, SQL Server MVP, Join Bytes!Books Online for SQL Server SP3 athttp://www.microsoft.com/sql/techin.../2000/books.asp

View 2 Replies View Related

Sql Server Stored Procedures, Just One Thing After Another

Jul 2, 2007

 In a previous post, someone helped me with creating stored procedures, and I am grateful because I am transitioning from the Access World.
Anyway, I get an error at .ExecuteNonQuery in visual studio 2005 when I run the following code: 
Dim strsql As String        Dim strconn As String        strsql = "sp_Roster"        strconn = "server=xxxx; user=xxxx; pwd=xxxx; database=xxxx;"        With comm            .Connection = New SqlConnection(strconn)            .CommandText = strsql            .CommandType = CommandType.StoredProcedure            With .Parameters.Add("TeacherID", SqlDbType.Char)                .Value = "DawsMark@aol.com"            End With            With .Parameters.Add("ClassID", SqlDbType.Int)                .Value = classid            End With            With .Parameters.Add("sID", SqlDbType.Int)                .Value = ssID            End With            With .Parameters.Add("sLastName", SqlDbType.Char)                .Value = lastname            End With            With .Parameters.Add("sFirstName", SqlDbType.Char)                .Value = firstname            End With            With .Parameters.Add("sMiddleName", SqlDbType.Char)                .Value = middlename            End With            With .Parameters.Add("Student", SqlDbType.Char)                .Value = fullname            End With            With .Parameters.Add("Password", SqlDbType.Char)                .Value = password            End With            .Connection.Open()            .ExecuteNonQuery()            With comm.Connection                If .State = ConnectionState.Open Then                    .Close()                End If            End With        End With
The error was:  Error converting data type char to int.
The stored procedure in sql server was as follows 
CREATE PROCEDURE sp_Roster     -- Add the parameters for the stored procedure here@TeacherID varchar(50),@ClassID  int,@sID int,@sLastName varchar(50),@sFirstName varchar(50),@sMiddleName varchar(50),@Student varchar(50),@Password varchar(50)ASBEGIN    -- SET NOCOUNT ON added to prevent extra result sets from    -- interfering with SELECT statements.    SET NOCOUNT ON;    -- Insert statements for procedure here    INSERT INTO Roster (TeacherID, ClassID, sID, sLastName, sFirstName, sMiddleName, Student, Password) VALUES (@TeacherID, @ClassID, @sID, @sLastName, @sFirstName, @sMiddleName, @Student, @Password)ENDGO
The error also says "sqlexception was unhandled by user code.
This is strange because this code worked perfectly when connecting to Access and when I used oledb. 
So how is it the code's problem?  Is the stored procedure causing the error or the code.  Can someone please help. thanks. 
<Edited by Dinakar Nethi>
Please mask your useird/pwd info in the connection string when posting to a public forum like this
</Edit>

View 2 Replies View Related

Array (or Similar Thing ) In Sql Server

Jul 4, 2005

I would like to write a fun or stored procedure to do some operation. It require me to know that what category is currently belong to certain people(people_table: category_table1               to           Many)However, when i use the select statement in stored proc, it return a set of result, not a scalar , therefore, i cannot use the variable to hold it. In addition, there are no array in SQL server.Question:1. Is there any way to hold the collection of result(like array)?2. Also, how to determine to use fun or stored procedure?(Since a integer is need to return by them)Thx

View 4 Replies View Related

SQL Server Sluggish First Thing In The Morning

Sep 15, 2005

Every morning our sql server runs very slowly which means our log on
page times out on a simple query. If we stop and start the sql server
everything runs fine for the rest of the day until the follwing
morning. the server is not used out of business hours excpet for a few
very small and simple jobs to delete records, These all run to
completion. Any help with this would be much aprreciated! Thanks.
Rob

View 2 Replies View Related

How Can I Select One Only To Display If There's Same Thing More Then One In Table.

Aug 20, 2003

Hi ..
i am SqL beginner. i having trouble output what i want from table.
table contain 3 columns
________________________________
|(names)|(item)|(location)|
1.| Jimmy | pizza| TX |
2.| Joe | ball | CA |
3.| Joe | ball | WA |
4.| Jim | shoes| AZ |
________________________________

i try to select all records out from this table. but column 2 and 3 contain same information in names and item only different is location. how can distinct one of them?? and display like the below, please advise.

|(names)|(item)|
1.| Jimmy | pizza|
2.| Joe | ball |
3.| Jim | shoes|
________________________________

View 3 Replies View Related

JOINing... But Not With The Multiple Rows Thing.

Jul 19, 2006

My thread titles need work, I know. :o

Ok, lets say I've got:

tblDocuments
id INT PK
documentName VARCHAR

tblUsers
id INT PK
userName VARCHAR

tblDocumentApprovals
userID INT
documentID INT
approvalDate DATETIME


If I want to get a list of documents, and the users who've signed them off (if any), I'd do something like:

SELECT [tblDocuments].[documentName], [tblUsers].[userName ], [tblDocumentApprovals].[approvalDate ]
FROM [tblDocuments]
LEFT JOIN [tblDocumentApprovals] ON [tblDocumentApprovals].[documentID] = [tblDocuments.id]
INNER JOIN [tblUsers] ON [tblUsers].[id] = [tblDocumentApprovals].[userID]

...which is lovely. Except - I don't want a row returned for each user that's signed it off. I want one row for each document, with a field containing a list of the people who've signed it off.

I know that it's bad design. I was reading an article only yesterday on how they're putting this kind of thing into the latest version of Access, and how it's a bit of a kludge. But it'd really, really help me.

How do you do it?

View 8 Replies View Related

Msdn Article On Getting @Identity Question

Sep 26, 2007

the msdn article explains how to input new data to a databse and return the primary key of the inputted row. It works perfectly. However, it explains how to insert a value, but there is a problem. It seems to set the value to be submitted in the VB code, instead of having the value be the user's input in the textbox. Look for the following line in the code below: newRow("ClientFileNumber") = "ClientFileNumber" It inputs "clientfilenumber" instead of what is actually inputted in the texbox. Does anyone know how to bypass this, to not have the words "clientfilenumber" inputted?Dim sqlconn As SqlConnection = New SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Client.mdf;Integrated Security=True;User Instance=True")
 Dim catDA As SqlDataAdapter = New SqlDataAdapter("SELECT * FROM Orders", sqlconn)
 catDA.InsertCommand = New SqlCommand("JobInsert", sqlconn)
catDA.InsertCommand.CommandType = CommandType.StoredProcedure
 catDA.InsertCommand.Parameters.Add("@ClientFileNumber", SqlDbType.VarChar, 50, "ClientFileNumber")Dim NewJobNumber As SqlParameter = catDA.InsertCommand.Parameters.Add("@Identity", SqlDbType.Int, 0, "OrdersID")
NewJobNumber.Direction = ParameterDirection.Output
 
sqlconn.Open()
 Dim catDS As DataSet = New DataSetcatDA.Fill(catDS, "Orders")
 
Dim newRow As DataRow = catDS.Tables("Orders").NewRow()
newRow("ClientFileNumber") = ""catDS.Tables("Orders").Rows.Add(newRow)
 catDA.Update(catDS, "Orders")
 
sqlconn.Close()
 
Response.Redirect("control_page_copy.aspx?NewJobNumber=" + NewJobNumber.Value.ToString())

View 1 Replies View Related

MSDN's Estimating The Size Of A Table

Jul 20, 2005

I was hoping I can get some help regarding subject mater located athttp://msdn.microsoft.com/library/d...des_02_92k3.aspMyTable has 23 fields with 100,000 records.Field1 nvarchar 90Field2 char 6Field3 varchar 8000Field4 nvarchar 200Field5 nvarchar 200Field6 nvarchar 200Field7 nvarchar 200Field8 nvarchar 200Field9 char 30Field10 char 30Field11 nvarchar 200Field12 nvarchar 200Field13 float 8Field14 datetime 8Field15 datetime 8Field16 datetime 8Field17 nvarchar 200Field18 nvarchar 200Field19 varchar 8000Field20 nvarchar 200Field21 nvarchar 200Field22 nvarchar 200Field23 varchar 8000Data Types:nvarchar = Variable-length, Storage is 2 times the # of characters enteredchar = Fixed-length. Storage is n bytesvarchar = Variable-length, Storage is actual length in bytes of data enteredfloat = Is float Fixed-length?, my precisions are 15 digits so 8 bytes.datetime = Is datetime Fixed-length?, Storage is 8 bytesI need the following blanks filled in for me, please :-)Num_Rows 100,000Num_Cols 23Fixed_Data_SizeNum_Variable_Cols 16Max_Var_SizeNull_Bitmap Int(2 + ((23 + 7) / 8)) = 5?Variable_Data_SizeRow_SizeRows_Per_PageFree_Rows_Per_Page 100 (no clustered index created)Num_PagesTable Size

View 2 Replies View Related

MSDN Subscription SQL Server 2000

Jan 18, 2007

If we purchase a new MSDN Professional subscription, does it come with SQL Server 2000 developer license?

View 3 Replies View Related

How Can I Tell If SQL Server Was Installed Using An MSDN Copy?

May 19, 2008

Hi all,

An internal licensing review is being carried out at my site for the first time since I joined. I have been asked to confirm that development SQL Server instances have been installed from MSDN installation disks and production instances from non-MSDN disks. I understand that serverproperty('licensetype') will show me this information in SQL Server 2000, and I am (perhaps incorrectly?) assuming that a result of "DISABLED" means MSDN was used for the installation.

In SQL Server 2005, i believe the installation does not record the necessary information in the registry, meaning serverproperty('licensetype') is of no use.

Is the question i've been asked impossible to answer? Is there any way I can find out if MSDN disks (or network copies of them) were used to install a SQL Server 2005 instance?

Many thanks.
James

View 4 Replies View Related

SQL Server 2000 - MSDN - AWE Memory

Aug 16, 2007

We use MSDN SQL 2000 , the enterprise edition for our development servers,
which have always had 2GB RAM.
Now they are bringing in a Win 2003 Enterprise with > 12GB RAM .
They want SQL SERVER 2000 to use AWE memory up to 12GB . Is there any limitation
on MSDN Ent. Edition using more memory.?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved