Begginer Confusion

Jul 7, 2007

Hey everyone,
I am brand new to SQL and I need some help getting started how to learn about relational databases and how to make the databases via Microsoft SQL(I have visual Studios PRO) and access and use them via C#.
I believe that the program that I am writing will be significantly better with a database. What I am doing is making a program that stores user input. But each user input that a person stores can have a reference to another user input, hence why I think that a relational database to store this information will be work out well. I also just want to learn more about databases because I think that it will be a good step in me learning more about programming.
What I need from you guys is a point into a direction for a book or a specific spot in a website that will introduce and teach me how to design these relational databases via Microsoft SQL. I have programmed alot with Java and recently switched over to C#, using the .net framework and found it to be great. I need to find out how to make these databases but also how to connect and access them through my application that will be coded in C#. I have "Programming in C#" by O'Reilly but it really doesn't go in that much about SQL databases.
The question that I really have come from the limited knowledge that I have gained looking online and talking to my brother (progamming whiz). A database is managed by a DBMS and clients can interact with the DBMS to get to the database. The question to me is how does one interact with a DBMS through a programming language like C#. I guess I am just really confused at the this link. If anyone could point me into the direction of a book to answer these question but help teach me to apply it to my own program, I would really appreciate it. Thank your for time.
P.S.
I have found some books online but I dont really know which one I really need. One that I found is called "Learning SQL on SQL Server 2005". If you have read, I would appreciate your opinion. Thanks

View 4 Replies


ADVERTISEMENT

Some Questions For A Begginer

Dec 29, 2005

Ok, im a lil confused
I know that SSSME (SQL Server Management Studio Express) CTP is a simple gui that you can use to manage your sql server databases and connections...
In Visual Basic express, you also have the Database Explorer and the option to add a database and create a connection and a gui to edit ur database/tables/fields etc, but it starts another sqlserver.exe service under the user that is currently logged in, so does it create and start its own server or how is that working?....also when i use one, i cant use the other....so which one should i use?
Im going to be using connection strings and creating my own datasets/data adapters so i dont really need the one used inside VS Express....

Still confused bout some things:
In SSSME under Registered Servers, there is currently one server that automatically starts, what if i want to add another server? it lets be add it, but it doesnt let me start the serive or connect to it....is express limited to only one server? or is my understanding of it off?

how/where would i add the database to my project? where should the actually database file be located?

sorry for these q's, moving from access to sql express

Thanks :O

View 1 Replies View Related

Null Problem(begginer)

Dec 14, 1999

I’m working with VB6.0 and SQL Server6.5 using ADO accsesing technology.
I have a silly problem with an If.
I declare a recordset called rstprimas to access to a table called “primas”
I make a “select sum” to this table and if the result is null I have to move
zero to a variable called liquidacion_primas.
I make the select and in the “inmediate window” I can see that the result of the select, that is,
rstprimas(0) is null, but in the if instruction the execution go for the else option. That is, it doesn’t
make the instruction “liquidacion_primas = 0”.
The if must be wrong, but.... why??, do it has someting to do with the “SELECT SUM”???
Can anybody tell me what is the wrong thing?

Thank you very much


MY CODE:


Dim liquidacion_primas as integer
Dim Sql_primas as string

Set rstprimas = New ADODB.Recordset

‘sql for accesing the table “primas”
Sql_primas = "SELECT SUM(prima) FROM primas WHERE codigo_cuenta = '" _
& rstliquidacion!codigo_cuenta & "' AND fecha_sesion = '" _
& fecha_sesion & "'"

‘select sum
rstprimas.Open Sql_primas, cnnoddo, adOpenKeyset, adLockOptimistic

If rstprimas(0) = Null Then
liquidacion_primas = 0
Else
liquidacion_primas = rstprimas(0) ‘the program make that instruction
End If

View 1 Replies View Related

How To Combine SQL With Web Site? (was Begginer)

Feb 14, 2007

OK, so im getting closer to producing my web site selling t shirts and stickers.

Ive also learnt a bit of SQL- through work.
How do I combine the 2 to enhance my site?

thanks

View 2 Replies View Related

Help With Error In Log File (Begginer)

Jul 18, 2007

I am trying to find out what is the reason for this error on my report server.

An error has occurred during report processing. (rsProcessingAborted)

Cannot create a connection to data source 'Reporting_FSSRC'. (rsErrorOpeningConnection)

For more information about this error navigate to the report server on the local

server machine, or enable remote errors









I checked the log and this is what is says.



<Header>
<Product>Microsoft SQL Server Reporting Services Version 9.00.3042.00</Product>
<Locale>en-US</Locale>
<TimeZone>Central Daylight Time</TimeZone>
<Path>C:Program FilesMicrosoft SQL ServerMSSQL.1Reporting ServicesLogFilesReportServer__07_18_2007_16_07_19.log</Path>
<SystemName>BRIARD</SystemName>
<OSName>Microsoft Windows NT 5.2.3790 Service Pack 1</OSName>
<OSVersion>5.2.3790.65536</OSVersion>
</Header>
w3wp!webserver!6!7/18/2007-16:07:19:: i INFO: Reporting Web Server started
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing ConnectionType to '0' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing ProcessRecycleOptions to '0' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file.
w3wp!library!6!7/18/2007-16:07:19:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!resourceutilities!6!7/18/2007-16:07:19:: i INFO: Reporting Services starting SKU: Enterprise
w3wp!resourceutilities!6!7/18/2007-16:07:19:: i INFO: Evaluation copy: 0 days left
w3wp!runningjobs!6!7/18/2007-16:07:19:: i INFO: Database Cleanup (Web Service) timer enabled: Next Event: 600 seconds. Cycle: 600 seconds
w3wp!runningjobs!6!7/18/2007-16:07:19:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!6!7/18/2007-16:07:19:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!6!7/18/2007-16:07:19:: i INFO: Memory stats update timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!library!7!07/18/2007-16:07:21:: Call to GetPermissionsAction(/Versatile).
w3wp!library!7!07/18/2007-16:07:22:: i INFO: Catalog SQL Server Edition = Enterprise
w3wp!library!6!07/18/2007-16:07:22:: Call to GetPropertiesAction(/Versatile, PathBased).
w3wp!library!7!07/18/2007-16:07:22:: Call to GetSystemPermissionsAction().
w3wp!library!6!07/18/2007-16:07:22:: Call to ListChildrenAction(/Versatile, False).
w3wp!library!7!07/18/2007-16:07:22:: Call to GetSystemPropertiesAction().
w3wp!library!6!07/18/2007-16:07:22:: Call to GetSystemPropertiesAction().
w3wp!library!6!07/18/2007-16:07:29:: Call to GetPermissionsAction(/Versatile/Versatile Customer).
w3wp!library!7!07/18/2007-16:07:29:: Call to GetSystemPropertiesAction().
w3wp!library!6!07/18/2007-16:07:29:: Call to GetPropertiesAction(/Versatile/Versatile Customer, PathBased).
w3wp!library!7!07/18/2007-16:07:30:: Call to GetSystemPermissionsAction().
w3wp!library!6!07/18/2007-16:07:30:: Call to GetPropertiesAction(/Versatile/Versatile Customer, PathBased).
w3wp!library!7!07/18/2007-16:07:30:: Call to ListEventsAction().
w3wp!library!6!07/18/2007-16:07:32:: Call to GetSystemPropertiesAction().
w3wp!processing!7!7/18/2007-16:07:33:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'Reporting_FSSRC'., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'Reporting_FSSRC'. ---> System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper.Open()
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.OpenConnection(DataSource dataSourceObj, ReportProcessingContext pc)
--- End of inner exception stack trace ---
w3wp!processing!7!7/18/2007-16:07:33:: e ERROR: Data source 'Reporting_FSSRC': An error has occurred. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'Reporting_FSSRC'. ---> System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
w3wp!processing!7!7/18/2007-16:07:33:: e ERROR: An exception has occurred in data source 'Reporting_FSSRC'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'Reporting_FSSRC'. ---> System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
w3wp!processing!7!7/18/2007-16:07:33:: i INFO: Merge abort handler called. Aborting data sources ...
w3wp!processing!7!7/18/2007-16:07:33:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'Reporting_FSSRC'. ---> System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
--- End of inner exception stack trace ---




Why does it say not associated with trusted sql server connection. I am the admin. How do i fix this, so i can view this report and its datasource correctly on the server.

View 4 Replies View Related

Begginer In SQL-Foreign KEy To Mulitple Tables

Aug 14, 2007

Hey everyone,
I am beggining in SQL and the .NET framework and have been running into some problems trying to design a relational database. I am completely new to it so I bought a book that was recommended in this Forum called "Handbook of Relational Database Design" and it has been pretty usefull so far. RIght now I am trying to make the Logical Data Model before I make the Relational Data Model.
The problem that I am having right now is creating a table that is a derivation from another table. For example, in the book they have a table called Property, and then two other tables called MountainProperty and BeachProperty. MountainProperty and BeachProperty are a type (relationship here) of a property. So basically Property will hold some data in a table, and then MountainProperty and BeachProperty will extend that property to contain more specific data. This is very similar to what I want to do. However I am having a problem understanding how an instance (or row) in Property, will have a link (foreign key) to a piece of data that is in Mountain or BeachProperty. I understand the foreign key in Mountain and BeachProperty and how they will link back to their "parent". But how will Property know its children, where is the link for that, how can one make a link to that. You could make a column with a foreign key, but which table would it point to, can one column point to mulitple tables? That doesn't make very much sense to me.
Basically what I am trying to say is that a row in the Property table can be multiple types, and these types will store more additional data about that row. How can I link to that data from that row in the Table Property.
I am terribly sorry if this is confusing or if it is so appartently easy for you, but this is the first time that I have ever tried to make a relational database and I am really struggling on seeing how to organize these tables properly. Thank yor for your time.
Jeremy

View 3 Replies View Related

DTS Confusion...

Nov 28, 2001

I'm using DTS for the first time and am having difficulty understanding some of its usage.
In essence, I have 70 tables which are on an ORACLE database. I've created the schema on SQLServer from an ERWin model. I now wish to use DTS to import the data into SQLServer. Of course there are referential integrity constraints. The DTS 'import wizard' seems oblivious of these and carries out the import in alphabetical order!
I'm now trying the DTS designer (which I don't fully understand yet). It appears that I have to create a workflow which moves the workflow from table to table in the order dictated by RI - this is not a trivial task! (I want point and click!!).
Are there any shortcuts I can take to have DTS automatically arrange the workflow in the correct order? Can I do it programaticaly? I don't want to have to fiddle with 140 'workflow' and 'success' links.
Cheers.

View 1 Replies View Related

Confusion In AWE

Apr 26, 2007

suppose i have enabled only AWE option in sql server but i didn't add 3

GB switch in boot.ini. in this case what will be the effect on physical memory?

View 9 Replies View Related

SQLExpress ASP.NET Confusion

Jul 19, 2006

Hello,I am just getting reaquainted with programming and all. I work in GIS mapping and am having diffilculty using  a ASP.net internet Map site and adding records to a needed database.I would like to be able to add records to a linked SQLExpress table when the user clicks on a map location. I adapted the following code snippet from an example that does what I would like only using an .mdb file.CODE:    // create connection to database                        var connection;                        connection = Server.CreateObject("ADODB.Connection");                        connection.Open("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=OutdoorsExp;Data Source=NOLOGOSQLEXPRESS;");                        status = "Can't access 'FishSQL' table.";                        // create recordset                        var recordset;                        recordset = Server.CreateObject("ADODB.Recordset");                        recordset.CursorType = 1                        recordset.LockType = 3;                        recordset.Open("dbo.FishTable", connection);                                                status = "Can't append new record.";                        // append record for clicked location                        recordset.AddNew();                        recordset.Fields("LongitudeI").Value = xco;                        recordset.Fields("LatitudeI").Value = yco;                                                recordset.Update();                        recordset.Close();                        // release the .mdb file                        connection.Close();However, this does not add anything to the SQLEx table. What am I missing? I am thinking that it might have something to with the primary key.I had a table with way more columns then just lat/longs (as above) but only coded it to add data to the latitude and longitude fields. Nothing got added of course. Would have to add data to every field that doesnt allow nulls.How do I generate a random, unique ID for a primary key on the fly and for example add it to the appropriate column.Thanks you in adavnce for any insights.

View 1 Replies View Related

Proc_problem Confusion

Nov 3, 2006

hi
i'm trying to write a stored_proc which involves 3 tables. Product, Orders and OrderDetails
i want to return products that haven't sold for a particular month. So these products aren't in the OrderDetails table. When i try and run this i get some really random results. when i change the Orders.OrderDate value to different months, i get the same result when i shouldnt. but then when i add the Orders.OrderDate row to the select statement, i get 400 results and i dont have that many products. the extended amounts are just for my datagrid
ALTER PROCEDURE proc_Report_NoSales_Septasset nocount onSELECT              Product.productID, Product.Title, Product.QtyOnHand, Product.Category, 0 as ExtendedAmount,              Product.BuyPrice, 0 as ExtendedAmount2 from       Orders, OrderDetails, Productwhere     Orders.OrderDate > '2006-09-01' and Orders.OrderDate < '2006-10-01'and        Orders.OrderID = OrderDetails.OrderID  and        Product.ProductID not in (Select distinct OrderDetails.ProductID from OrderDetails)/* Product.ProductID NOT EQUAL to OrderDetails.productID */and        Product.productID <> OrderDetails.productIDGROUP BY             Title, BuyPrice, Category, Product.ProductID, QtyOnHandORDER by            TitleRETURN
any ideas
cheers!!!

View 2 Replies View Related

Very Simple Confusion

Nov 7, 2006

hay friends
scene is that i wana read single multiple rows of a single column from a sql database and then want to shows those values in text box,,,
so plz tell me ho to do it.
 By using data set ,,data table or what to use for this and how....
wll be waiting for ur coordination

View 1 Replies View Related

Instance Confusion

Jul 26, 2007

I have built an application in web developer that has a sql data base in the App_Data
folder. It works locally fine.
I have uploaded it to my web host client successfully and it all displays. The web host is enabled
for asp.net.  But the sql data base is not working....no information is getting from the web application into
my instance of sql in App_Data.
My web host has given me an      e:/webs/mywebsitename.com/data/nameofdb.mdf
to alter in my web config connection string which I have done, but still not working.
I have also tried  every version of this in connection string without success
Im just confused about the e:  part................how is that going to get to my App_Data?
Can someone give me a quick overview of what the problem might be
richard

View 1 Replies View Related

DateTime Confusion.

Oct 25, 2007

Hi All,I'm stumped. I've got a stored procedure with a  number of input parameters, and working fine.I added two extra input parameters, FromDate datetime, ToDate datetime. I have not even included these in the SQL yet and just tried to execute the stored proc alone with manually inputting paramters, but I keep getting error: @FromDate: this input parameter cannot be converted.That surely means a formatting issue, so I copy and pasted a value directly from the database into this parameter field, and still get the same error. I've tried various formats, with single and double quotes, and without. But just dont know?And even when I populate these parameters in my code and call the stored proc, it returns no results either, even though I haven't included these new date paramters in the SQL select, so that means it was in error and no doubt a formatting issue on those date fields.format I used was:  17/07/2007 00:00:00 I tried to populate the parameters via the code as follows:            Dim dt As DateTime            DateFromTB1.Text = DateTime.Now            DateTime.TryParse(DateFromTB1.Text, dt)            SqlDataSource1.SelectParameters("FromDate").DefaultValue = dt I know there is an extra step for now (DateFromTB1.Text = DateTime.Now), this step will fall away and just parse the textbox.text field as entered by the user.Any help appreciated, thanks.  

View 4 Replies View Related

My ISNULL Confusion

May 1, 2008

I've got this query and it use to work or at least I thought it did. Could someone please help me with it.
Thank you
SELECT CID, CompletionDate, MarkedExport, CustomerName, EditUser, RouteID, WorkOrder FROM RouteCustomer WHERE (CompletionDate IS NOT NULL) AND (ExportDate IS NULL) AND (RouteID LIKE '%' + ISNULL(RouteID,@RouteID) + '%') AND (EditUser IS NULL OR EditUser = '' OR EditUser = @EmployeeID) AND (MONTH(CompletionDate) = ISNULL(MONTH(CompletionDate),@Month))
The problem comes with in the WHERE clause. What I wanted it to do is if the user did want to use a RouteID critera then the user would speified one else it wouldn't, and it was my belief that the ISNULL feature in SQL was the answer for that. same for the Month. I believe the EditUser is fine the way it is written.
thanks to anyone that can help me with this.
 Rex

View 9 Replies View Related

Connection Confusion

Apr 27, 2005

When I try to run my application on our server I cannot connect to the SQL Server that's on the same machine (a named instance). I get the SqlException:Login failed for ("null") user. Not a trusted SQL Server connection. I CAN however, connect to this database from the IDE on my laptop--the app works just fine.
I have reconfigured the IIS, the default site and the directory for the app: I turned off anonymous access, turned it on, changed users, changed passwords, etc. I have done the same for the database, added users, changed permissions, added permissions, etc., you get the picture...none of it worked. (I changed the connection string to those users/pwds)
I saw on an MS site that this error can occur under heavy loads...but that's not the case here.
Please help! Thanks!!

View 2 Replies View Related

Locking Confusion

Jun 15, 2000

In Query Analyzer I have 2 connections active. In the first connection I have the following SQL Insert statement:

Begin Tran
Update Account
Set SomeField = 0
Where CustomerId >= 1000 And CustomerId <= 1101

-----------------

In the second connection I have the following SQL Insert statement

Begin Tran
Insert Into Account (Account,AccountName,AccountTypeRowId,CustomerId,U serId)
Values('MMM-989', 'Test Account', 1, 1098,207 )

-----------------

The query in the second connection will hang waiting for the query in the first connection to finish. The query in the first connection touches 767 records (out of a total of 9174).

If I change the Where statement in the first connection to "... And CustomerId <= 1100", the query in the second connection will execute immediately. The query in the first connection is now only touching 645 records instead of 767.

Could someone explain to me why this is happening?

View 3 Replies View Related

Trans Log Confusion

Nov 5, 2002

:confused:

Here's my situation (SQL2K)

We have a testing database we're using to convert large amounts of data from 1 system to another. We might process 5-6 million records, but don't care about being able to recover point-in-time.

I set recovery mode to simple, do a full backup every night. I keep getting large transaction logs. I manually run Shrink Database when I realize the logs are big

What can I do to prevent the logs from getting big in the first place ?? Can I prevent logging from happening ?

I keep reading various books and BOL, but I guess I don't quite "get it" yet ......

Any plain spoken, detailed suggestions would be very appreciated .... thanks in advance.

View 5 Replies View Related

Domain Confusion?

Feb 24, 2002

I can map to a domain to the server where I have a sql Server database from my machine which is in another domin.
However, I cannot register the sql server with enterprise manager from the same machine. I am assuming that it is not a permission problem since I could not get the registration to work logging on as SA or with windows authorization. What should be looked at?

View 1 Replies View Related

Query Confusion...

Dec 11, 2006

Here's an example of two tables I need to get results from.

Client:
Number
1
2
3

Patient:
Number - Client - Hospitalized
50 - 1 - E
51 - 1 - E
52 - 2 - E
53 - 2 - ''
54 - 3 - ''


The only result I should be returning is Client '1' as they would be the only one where ALL patients have an 'E' under patient.hospitalized.

How would I go about running a query such as this?

Any help would be greatly appreciated!
Shawn

View 1 Replies View Related

Performance Confusion

Jun 29, 2006

Hi,
Can any of you folks take a minute to tell me why the results of the attached test are weird. I'm trying to come up with a method of allowing my business layer to interact with the data layer - specifically a nice, easy to maintain, but safe method of passing parameters without adversely impacting performance.

This is only a few of my sketchy ideas so far but I'm stuck because I cannot prove that using OR is slower than a straightforward = because each time I run the test the OR seems to perform better. Even changing the sequence in which the piece work still does alter the OR begin better than =.

And, of course, as that makes no sense whatsoever I cannto really progress.

Any thought would be appreciated. I hope I have altered the script enough that you can just run it straight in and see what I'm talking about. I only introduced the transactions to see if any of that stuff my be interfering.

Thanks.

View 7 Replies View Related

Mirroring Confusion.

Aug 10, 2006

I am testing out Synchronous Mirroring and have a question about failover. It seems the only way I can failover to the Mirror box is to log onto the Principal box and hit the Failover button? Is the whole point of mirroring to be able to handle the Principal not being available? Is there another way?

TIA, ChrisR

View 4 Replies View Related

Confusion About Indexes

Apr 10, 2008

Hi guys,
Is it possible for a column in a table to have a clustered index & the same column to be a part of a non clustered covering index.
Please try this one.I am confused
Create table test
(
id int primary key,
name varchar(40),
age int
)
CREATE NONCLUSTERED INDEX testindex ON test (
id,
name,
age
)

sp_help test

After I do sp_help test it shows two indexes created, one on id & the other one on id,name& age as a part of covering index.

View 4 Replies View Related

Dateadd Confusion

Aug 10, 2005

I am trying to find a group of clients that were entered last week. I am getting all the dates to go with the Monday of the week they were entered. i.e. If they were entered on 8-2 or 8-3, they go with 8-1. If they were entered, 8-9, they will be under the 8-8 Monday.

No problem with finding the Mondays using either the nice 'weekcommence' function I found here or using numerous t-sql examples.

One thing I don't understand is- how come I can't use an equal sign in my syntax?

For instance,

SELECT dbo.weekcommence(date_added)
FROM clients
where dbo.weekcommence(date_added) = dateadd(wk, -2, GETDATE() )

won't return any results. If I use a greater than sign, I get this week, 8-8 and last week 8-1. I only want to see the week of 8-1.

Now- look at what I have below: Shouldn't I really be able to see ONLY last week's Mondays with this?

select dateadd(wk, -2, dbo.weekcommence(date_added))from clients

To me- the way this reads is: show me 2 weeks ago, from these dates (first Mondays function).
The results are the last two MONTHS, not weeks. What am I misinterpreting?

I can also use this:

SELECT dbo.weekcommence(date_added) FROM clients
WHERE (dbo.weekcommence(date_added) >= dateadd("d",-7,DATEADD(wk, DATEDIFF(wk,1,getdate()), 0)))

and get the week's of 8-1 and 8-8. But I can't get JUST 8-1 if I take out the greater than sign.

To me- this one reads: Select all my Mondays from the function. Show me Mondays from my function that are = 7 days from this Monday's date.

It seems like it should be straightforward, but I'm obviously missing something big. Any help?

View 8 Replies View Related

Datediff Confusion

Jun 22, 2007

I have a DELETE statement that is taking ages. I was asked to look into it and immediately noticed the use of function on the column. So its doing a scan even though there is an index on the datecolumn.

HEre's the original statement:
Delete someTable Where datediff(year, DateColumn, getdate()) > 1

I have rewritten it as

Delete someTable Where DateColumn < dateadd(year, -1, getdate())

When I did a count(*) the counts from previous query didnt match with the new one. Did i miss something?
Perhaps a fresh pair of eyes might help me

thanks,
don.

View 6 Replies View Related

Login Confusion

Jul 23, 2005

Hi,I am Just beginning to get to grips with SQL Server v 7 security on a standalone win 98 PC.I have created a login which only has access to the pubs database and when Itry and connect to any other database (while using this login) I amcorrectly told that I don't have access. However, Enterprise Manager doesnot request a login and therefore the log in seems to grant full access toevery database.How can I get Enterprise Manager to request a log in?Thanks.

View 2 Replies View Related

Confusion Over ANY Keyword

Jul 23, 2005

I am studying for the MSCE/MCDBA exam 70-229. In the book I am using("MCSA/MCSE/MCDBA Self-Paced Training Kit: Microsoft SQL Server 2000Database Design and Implementation Exam 70-229, Second Edition") I amlooking at the section on the ANY/ALL keyword.<QUOTE>USE PubsSELECT TitleFROM TitlesWHERE Advance > ANY(SELECT AdvanceFROM Publishers INNER JOIN TitlesON Titles.Pub_id = Publishers.Pub_idAND Pub_name = 'Algodata Infosystems')This statement finds the titles that received an advance larger thanthe minimum advance amount paid by Algodata Infosystems (which, in thiscase, is $5,000). The WHERE clause in the outer SELECT statementcontains a subquery that uses a join to retrieve advance amounts forAlgodata Infosystems. The minimum advanceamount is then used to determine which titles to retrieve from theTitles table.</QUOTE>I don't understand why this references the "minimum advance". If yourun the subquery on its own, it returns the following values:5000.00005000.00005000.00007000.00008000.0000NULL[color=blue]>From my limited understanding, the "ANY" keyword applies to at least[/color]one value, but which one? How is this determined?Any help gratefully received.Edward--The reading group's reading group:http://www.bookgroup.org.uk

View 4 Replies View Related

MS SQL 2005 And PDC Confusion

Nov 3, 2006

hello everyone, I am kind of confused with MS SQL 2005. I have friends who have been developing with MS SQL. They told me that in order to have a MS SQL Server, one need to have a PDC.

This is really a problem since I am behind a Unix box acting as a firewall/gateway. AFAIK, to install a PDC means that DHCP comes with it and DNS. This is really a problem...

Is it possible to have a MS SQL server without having to create a PDC? If so, how do I connect to my database on an MS SQL server. I develop in VB. I would appreciate any help/tips... TIA :D

View 1 Replies View Related

Security Confusion.....!

May 8, 2008

Hi All,


one thing always bothers me in passwords with SQL Server. See i created a User with username and password for Crystal Report user to access READ ONLY Data. and permission are set accordingly for this Login at SQL Server end for database. now i have to tell the user the username and password so he or she can create ODBC connection. in such case, what is purpose of password here. no matter we keep the password simple or hard to remember or guess, it won't matter. i can not even enforce user to change the password at next login as Crystal report gives no UI to do that.

what is exact philosphy.

I understand how we can set permissions for users for accessing data and what is the purpose of enforcing rules on password like Expiration or next login change password etc, but how will it work in above senario......!

Many Thanks,

View 4 Replies View Related

Confusion Between 2 Queries

Jul 30, 2007

Hi


I was hoping that someone will be able to explain to me what the difference is between these two queries, because i get different results when i run them.

I'm trying to count the distinct unique email addresses



Code Snippet

SELECT DISTINCT Prefix_code, Email
FROM tmpmedschemereal
WHERE email like '%@%'
AND prefix_Code = 'UNW'
GROUP BY prefix_Code, email

return 1939 rows








Code Snippet
SELECT DISTINCT Prefix_code, COUNT(Email)
FROM tmpmedschemereal
WHERE email like '%@%'
AND prefix_Code = 'UNW'
GROUP BY prefix_Code, email

returns 2006 rows



Why is there a difference, as far as i know they are suppose to return the same amount of rows, but there must be something that i misunderstand.

Will someone please be able to clarify for me what it is?

View 9 Replies View Related

WaitAny-WaitAll Confusion

Jul 24, 2007

Hello,
When using Asynchronous processing with ADO.NET 2.0, I use BeginExecuteNonQuery() and the EndExecuteNonQuery();.

I would like to know what is the difference between the above two methods when working on a web page.

In case of the WaitAny, we will wait for any operation that finishes and then update some UI, in the other one, we wait until all operations are finished, and then update the UI.
But in both cases, the UI that was updated through code, will not be shown on the page, until all operations have finished.

I did my testing here and noticed this fact, should the WaitAny whenever it is finished, it updates the UI and the UI refreshes for the user? Am I missing something in here?

Thanks

View 3 Replies View Related

Simple SQL Command Confusion

Jan 19, 2008

Hey everyone,
I have been stuck on this for a few hours now and I think I am missing something simple.
I have 2 tables.  A Groups table and a GroupMembership table.
Groups Table
GroupID (PK)
GroupName
GroupDescription
CreatedBy
GroupMembership Table
GMembershipID (PK)
GroupID (FK)
UserID(FK)
I want to pull all the GroupNames, GroupDescriptions, and CreatedBy for all the groups the user is NOT in. 
Is this really simple and I am just missing it after hours of frustration?  Or did I just set the database up badly?
Thanks,
Chris

View 2 Replies View Related

Data Type Confusion...

May 22, 2004

Which Datatype should i choose for Field "AGE"

Do i select "Int", "Char"?

SQL Server...in Table Desgin, The length for Int only can be max of 4 ?

Is this mean it can only store 4 digit ?

What if i want to store numbers but more then 4 digit ?


What will be the appropriate datatype to store numbers?

View 5 Replies View Related

Enterprise Manager Confusion

Nov 3, 2005

Ok i know that the main reason for the error that contains System.Data.OleDb.OleDbException: Login failed for user 'BEDROOMASPNET'.is because i do not have the ASPNET registered. From what i have been told i need Enterprise Manager.I HAVE NO CLUE WHERE TO GET IT OR HOW TO CONFIGURE IT OR ANYTHING OF ITsorry for the caps.I have search on here and google and nothing any helpthanks

View 3 Replies View Related







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