Setting Up A Settings Table

May 10, 2006

I am creating an image gallery system, where there is an admin and
multiple users upload images. Each user is restricted to uploading 8
images. Currently, I have this hard coded into a trigger. I would
like it to use a table field instead... one that the admin can change
on the fly. I want to call this table Settings, but I want to create
insert 1 record, and then block all subsequent INSERT statements
(there's only going to be 1 setting) so that the Settings table will
only have 1 record in it for its entire lifetime. What's the best way
to do this?

View 2 Replies


ADVERTISEMENT

Setting A Null Value Through A Table Adaptor

Jan 31, 2008

(If this is not the right forum, please advise and I'll repost).I am using Visual Web Developer 2005 Express (ASP .NET 2,0), with a SQL 2005 database.  I have programmed a Data Access Layer using table adaptors: this is my standard way of using the database.  I had defined a table, Voyages: -CREATE TABLE [dbo].[Voyages](    [VOYid] [uniqueidentifier] NOT NULL CONSTRAINT [DF_Voyages_VOYid]  DEFAULT (newid()),    [VOYUser] [varchar](50) NOT NULL,    [VOYShipName] [varchar](255) NOT NULL,    [VOYDepartPort] [uniqueidentifier] NOT NULL,    [VOYDepartDate] [datetime] NULL,    [VOYArrivePort] [uniqueidentifier] NOT NULL,    [VOYArriveDate] [datetime] NULL,    [VOYCaptain] [varchar](50) NULL,    [VOYComment] [varchar](1024) NULL,    [VOYUpdateid] [uniqueidentifier] NULL, CONSTRAINT [PK_RESVoyages] PRIMARY KEY CLUSTERED I defined a table adaptor based on the query SELECT     Voyages.*FROM         Voyagesand defined variables in my VB code: -    Dim tavoyages As New ShippingTableAdapters.VoyagesTableAdapter    Dim tbvoyages As Shipping.VoyagesDataTable    Dim trvoyages As Shipping.VoyagesRowand read data into these variables with:-            tbvoyages = tavoyages.GetDataByVoyid(Voyageid)            If tbvoyages.Count > 0 Then                trvoyages = tbvoyages(0)                 ....All of this works perfectly, and trvoyages contains all the correct data.I wanted to set VOYUpdateID to NULL, so I coded     trvoyages.VOYUpdateid = Nothing    tavoyages.update(trvoyages)However this set the database field to "00000000-0000-0000-0000-000000000000", not to NULL.   However this code, in which we use another of the Update overloads naming all variables and "Nothing" in the VOYUpdateid position, works perfectly: -tavoyages.Update(trvoyages.VOYid, trvoyages.VOYUser, trvoyages.VOYShipName, trvoyages.VOYDepartPort, trvoyages.VOYDepartDate, trvoyages.VOYArrivePort, trvoyages.VOYArriveDate,                 trvoyages.VOYCaptain, trvoyages.VOYComment, Nothing, trvoyages.VOYid)    Is there any way in which trvoyates.VOYUpdateid can be set to Null.  I tried dbnull, but just got an error message.Thank you,Robert Barnes. 

View 2 Replies View Related

Setting Default While Creating Table

Aug 31, 2007

Hi,

I am having 2 tables Groups and GroupMembers table . the following are the structures for the above two tables

Group
---------

GroupID
GroupName
CashassignmentType


Groupmembers
----------------------

MemberID
memberName
GroupID
Payment


Group table is referenced by groupmembers table through Group ID Column
Here while i am inserting a row (member) into a Groupmembers tables i want to crosscheck with CashAssinmenttype column of Group table. if cashassignment type i want to set the payment with 0 other wise the payment specified should be inserted

Groupmembers.Payment <---> If Group.CashassignmentType=0






Then 0
Else Payment




I want to set this Condition while creating tables itself

Please let me know what could be the best option to proceed here

Thank you

View 1 Replies View Related

SqlDataSource SelectCommand - Dynamically Setting The Name Of The Table?

May 7, 2007

Can you dynamically set the name of the table in the SelectCommand section of the SqlDataSource? (If it is relevant, I code in C#)
 For example,
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:Test-MySQL %>" ProviderName="<%$ ConnectionStrings:Test-MySQL.ProviderName %>" SelectCommand="SELECT * FROM TestTable">
I would like to replace 'TestTable' with the name of a table that is extracted from a string array in the code-behind.
Appreciatively,Peter

View 4 Replies View Related

Issues On Setting The Table Visibility Using An Expression

May 21, 2007







Hi team,



I'm working on Reporting service 2005. When I give an expression for visibility of a table in a report based on a parameter, the contents are coming in a single page and it is not based on the interactive size of the report. I want the data to be coming on different pages based on the interactive size of the page. If the visibility is set directly it works. Could you please help me to solve this issue?



Thanks in advance,

Minu

View 1 Replies View Related

Query For Setting Cascade On Update In Table Relationships

Aug 22, 2007

Hi,

I'm looking for a query I can use to alter table relationships. What I want to do in particular, is to set every relationship to cascade on update. Can anyone point me out to a solution? MSDN seems very vague in this subject.

Thanks,
Tiago

View 2 Replies View Related

Error When Setting Map Document Label In A Group Of A Table

May 21, 2007

Hi,



I try to activate the map document control on my report. My Report is composed of a table in which I group by 2 criterias. When I set the document map label of the first entry of the group list then I get an error on the preview :



"An internal error occurred on the report server. See the error log for more details. "



Can someone tell where can I find the error log file ?



thanks in Advance.







View 3 Replies View Related

SQL 2012 :: Query Based On Column Name / Setting Up Database Table

Oct 30, 2015

I have a set of data spread across a number of tables regarding stock market data. An example of this follows:

Market Capitalization...

Date CompA CompB
01/01/11 100 5
02/01/11 102 4

Share Price....

Date CompA CompB
01/01/11 100 100
02/01/11 101 99

Event Data...

Date Company
01/01/11 CompA
02/01/11 CompB

Pretty simply, I need a way to retrieve the market capitalisation and share price data based on the event data. So for instance I say 'oh, there is an event on the 01/01/11 involving company A, the market capitalisation on this day was 100, then for the next event it was 4 for company B.

I can also transpose the data so that the company name is in the rows and the dates in the columns for the market cap and share price tables, but this leads to the issue that when I try and get the data, I don't know how to query the correct company for that date.

For instance:
SELECT Event.Date, Event.Company
FROM Event

how do I now say.....

SELECT MarketCapitalisation.Column
WHERE Column = Event.Company
AND MarketCapitalisation.Date = Event.Date.

I have played around with a few basic joins, but I am having issue with the principle of that second to last line of SQL (so only getting the correct column).

I still have a copy of the data in excel so can flip things around as needed, but that would only mean that I would have the issue of WHERE Column = Event.Date instead of Event.Company.

View 1 Replies View Related

Built In Limit Or Setting That Limits The Number Of Rows From An OLE DB Source Table In A Data Flow Task?

Feb 16, 2007

I have a table that I'm loading as part of a control flow that in turn is copied to a target table by using a data flow task. I am doing this because a different set of fields may be used from the source entry to create the target entry based on a field in the source table. That same field may indicate that multiple entries need to be created in the target table from one source table entry for which I use a multi-cast transformation.

The problem I'm having is that no matter how many entries there are in the source table, the OLE DB Source during execution only shows 7,532 entries being taken from the source table. If there are less than 7,532 entries in the source table, everything processes fine. More than 7,532 and the data flow task only takes 7,532 and then seems to hang. It also seems as though only one path of the multi-cast transformation is taken when the conditional split directs a source entry down that path.

Seems like a strange problem I know, but any insight anyone could provide is appreciated. Thanks.

View 1 Replies View Related

NT Settings For SQL 7.0

Feb 24, 2000

View 1 Replies View Related

Awe Settings

May 6, 2002

I am running AWE on SQL 2000 (the server has 8 gig of RAM). I have the SQL Server set to use a max of 6 gig. The server hung unexpectedly (SQL showed no errors or signs). Has anyone had any problems with using AWE, and or any suggestions or changes I might need to do?
Thanks

View 1 Replies View Related

Installation Settings

Jul 26, 2000

Hi,
Can i check installation settings for SQL Server 6.5 ... like what sort order id. has been choosen etc. ? by any query ?

Thanks

View 1 Replies View Related

Collation Settings

Jul 16, 2002

New SQL2000 installation into which I've copied data from multiple SQL7 installations. Some of the databases I've copied over from a SQL7 server with code page 850, sort order/collation 42, using the detach-copy mdf/ldf-attach procedure outlined elsewhere on this site (thank you). Other databases have been DTS'd from another SQL7 server with code page 850, sort order/collation 44.

In the end I want all databases to be in the default Latin1_General_CI_AI collation I've chosen for my installation.

I'm off to immerse myself in collation papers and alter database documentation from BOL, but was hoping someone could enlighten me in a less painful way.

Thanks,

Al

View 2 Replies View Related

Regoinal Settings

Mar 27, 2008

Hi all

I've got a problem with an American software vendor, who's asked me to check and adjust the regional settings within SQL Express 2005, installed on an XP SP2 pc

I'm scanning meta data into this database

If I enter a date field with a UK date format, I get an error in the SQL logs

If I enter a date field with a US date format, everything is fine

The XP box is setup with all UK region settings

I've been told that my SQL install should automatically use the region settings from whatever OS that it's installed on

I've checked everywhere within SQL, and it all looks to be setup with UK region settings

I suggested to the software vendor that the problem lies with their software

Can anyone suggest if I've missed anything, or where I should be checking my region settings within SQL?

Kind Regards

Tonasis

View 2 Replies View Related

Database Settings

Apr 14, 2008



From the sql server management studio i cannot see database properties

logical file name of mdf, location of the mdf
logical file name of ldf, location of the ldf
what setup should i change to see the properties.

View 5 Replies View Related

SQL SERVER SETTINGS

Sep 9, 2006



When SQL Server and Web site are both on same machine,

it runs fine, can get data and display in web page.

but when trying to get data from remote SQL Server, it gives error.

What's the setting for SQL server configure and security settings

in different versions?



MS SQL 2000 | MS SQL 2005

==============================================

Framework 1.x ? | ?

Framework 2.0 ? | ?



Thanks alot.

Please provide some setting help for the ?

View 4 Replies View Related

Default Rs Settings

Jun 26, 2007

is there a simple manual how to setup RS.



with the administrators group im able to view my reports. but normal users are not able to view anything. they can enter reporting services, but not open a report.

View 1 Replies View Related

SQL Configuration Settings Being Ignored?

Sep 13, 2006

I am sure I'm being blind here (it wouldn't be the first time - and won't be the last time).

I have a package that retrieves some values from SQL table to allow me to dynically create an email message, so it retrieves To Addresses, From Address, Header, Body from a table, populates variables, and uses expressions to assign those to the SEND MAIL TASK.

That is working (after a bit of head/wall/banging to get my default virtual SMTP server running locally).

Now I am trying to make the SMTP Server Name dynamic. The Property SMTPConnection specifies the SMTP Connection Manager to use, and not the server, so it doesn't seem as though I can configure a property on the SEND MAIL TASK to achieve this.

Now I'm focussing on using SQL Package Configurations to try and drive this. As I see it, just like XML configurations, if you change a value in the configuration source, then when the package runs, it get's that value, and uses it.

I have change the configuration value (outside of the package). I confirm it is actually changed by running a SQL Task that gets the value from the configuration table, and view the value assigned to the variable in watches. The value returned is a different value (in my case I changed it to an invalid servername), and yet the task still runs through successfully, using the previous SMTP servername.

huh?

View 4 Replies View Related

SQL 8 Password Settings

Sep 29, 2006

I wanted to know if there is a way to enforce security settings on SQL 8 Server.  Specifically password lengths, expiration,e tc. These servers run on a Windows Platform, so if it is not possible to enforce passwords at the database level can the windows passwords parameters be enforced for the server.

Also, how would I be able to find the last changes made to the tables within the database. 

View 1 Replies View Related

Site Settings

Oct 16, 2006



I need to place some site settings in my Report Manger.But in my Report Manager there is no Site Settings Icon.Is this installation problem please help me.

View 3 Replies View Related

Where And How Can Timeout Settings Be Changed

Nov 6, 2006

I have a page that uses an SQLDataSource web control to populate a GridView control.  The SQLDataSource control uses three parameters, one of which is a text string (varchar(50)).  I get timeout expired exceptions when I run the page with two specific string values, yet when I run the stored procedure in SqlSvr Management Studio, the procedure runs in 5 seconds and under 1 seconds.  Being rnew to ASP.NET 2.0 and .Net in general, I have no idea where this lag is occurring.  I would like to know two things:
1.  What is causing the lag that causes the timeout in ASP.NET 2.0.
2.  What can be done to adjust the timeout period SQLSVR, IIS, ASP.NET).
The underlying query is running as desired (considering the data it has to chew on).  For all other values, data is returned almost instantanious.  I can provide a copy of the query id need be.
 Truly appreciate any insight you can give me!

View 2 Replies View Related

Incorrect Settings Arithabort

Dec 3, 2007

INSERT [DELETE] failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods.
On local dev machine with SQL Express DB everything works fine. Once moved to shared hosting environment (with adjustments to web.config), insert and delete stored procedures produce the above error.
Made sure that stored procedures SET ARITHABORT ON at the beginning and OFF at the end, without success. Even SET ARITHABORT ON at DB level without success.
Suggestions appreciated
 

View 2 Replies View Related

SQl Server Connection Settings

Dec 11, 2003

Hi all,

I am a newbie to .NET and MS SQL server. I am trying to connect to sql server d/b from my application files.

How should i open a connection from my system pc5 (where application/proj being developed) to SQL serevr which is installed on my server(server1). Both are in network.

I have installed sql client on my system(pc5) and created my d/b (MyDB) thru EM, now how can i create username & password for MyDB datbase.

I had installed ASP.NET Commerce server(from ASP.NEt site) on my system pc5 its working fine with accessing Commerce d/b from server1. I observed the string in web.config file of commerce application it is as follows.

<add key="ConnectionString" value="server=server1;database=Commerce;uid=CommerceUser;pwd=CommerceUser;" />


In the same way can i create Username and passsword for MyDB database, if so how should i do that. that should look like some thing like this..

<add key="ConnectionString" value="server=server1;database=MyDB;uid=MyDBUser;pwd=MyDBpass;" />
to do in this way i need to create username and pw for MyDB . How should i create username ansd pw for MYDB datase.

Pls help me out.

Thanks in adv
Kumar

View 3 Replies View Related

Changing ConnectionString Settings

Jun 5, 2006

Hello all. I created an app locally with VWD Express and moved it to to our server but I am getting the following error...
An attempt to attach an auto-named database for file D:WebApp_DataSurvey.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
This is the connectionstring from the web.config file used on the server. I did not change anything from the local copy.
<connectionStrings>
<add name="SurveyConnectionString1" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Survey.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
What settings do I need to change in order for this to work? Any advice is appreciated. Thanks.

View 1 Replies View Related

Changing Language Settings

Jan 23, 2004

Hi,

I was wondering how to change the language settings on SQL Server. The server is currently set to US English, and I was wondering how it is possible to change it to UK English. The Server Regional Settings are set to UK English.

Also, on a semi-related topic, does SQL Server store dates in a universal format, and then when data is requested does it 'translate' these dates into the format required by that particular regional setting?

Thank you for any input

Marman

View 1 Replies View Related

How To Change Search Settings

May 12, 2014

Using the Agentpress theme I have put together a client site that is fully functional, however the client has asked that the search query is altered slightly and i'm having trouble working out how to do it.Basically they want the search facility provide the following options:

1. Bedrooms searched for as 1+, 2+, 3+ and 4 or more.

2. Property availability to provide just 2 options - Available and Include Let Properties.

how to change the search settings to return this information.

View 2 Replies View Related

Changing The Language Settings

Apr 5, 2006

Hi all,

I need to change the Language Settings from my query analyser. Is it Possible???

If so, how ??

Thanks in advance

Regards,
satish.r
"Known is a drop, Unknown is an Ocean"

View 1 Replies View Related

Xp Pro Settings To Work With Replication

Dec 23, 2006

hi guys :( ive searched on all the topics here about replication. but now i am wondering what windows xp settings do i have to edit? i read something about dcom settings and changing permissions. what is the RIGHT way to share a file or whatever because the schema cannot be accessed for some reason. i need a whole list of things to do because things are not working out after i read the tutorials on other sites. please someone help me.

basically i need to have two servers that need to be replicating each other. i realized that the instances have to be named so i am just totally confused. ill even let anyone connect remotely to help me out if they want. or explaining will do fine. please! thanks guys!
happy holidays!

View 3 Replies View Related

Management Studio - Settings

Jan 15, 2008

Hi All - sorry for dumb question.

I changed a log-file growth from 10% to 10MB in November. Then had to do the same again today.

Is there anyway it could have (somehow) changed-back by itself?

View 3 Replies View Related

International Settings For SQL 2000

Feb 26, 2006

I will doing an installation of MS SQL 2000 that will be used by multilanguage web sites.The languages are Japanese, German and of course English.Currently I'm planning to install MS SQL 2000 standard version butafter reading some articles I'm considering the Enterprise version.Can someone shed some light on the advantages of using Enterprise vsStandard strictly from a language support perspective?Also, is there any caveats or other considerations that I should keepin mind to make sure that the developers have all they need to developthese multi language sites?Thanks in advance.

View 1 Replies View Related

Are Transactional Settings Used Only During Updates?

Jul 20, 2005

Hi,In the Web application I am working on, data is read from a SQL Serverdatabase. At any time, there are about 15 people browsing the web.The SQL Server database is updated with new information once everyhour. The update takes a couple of minutes. The isolation level duringthe update is so to Serialazable so that the front-end does not getany incorrect data.Now, here is my problem. When the web page is being loaded, the serverside ASP.NET code uses several SELECT statements at multiple places.For various design reasons, these SELECT statements cannot be combinedinto a single statement. As a result, it may happen that during thepage load, we get some data before an update and some data after anupdate.I am wondering if I must used a transactional lock even for the Webapplication although technically it is not updating the database.Also, after playing with various transactional settings, I noticed thefollowing behavior for the readers when a writer enters a transaction:1. If the reader app has not yet executed the query, the call to queryexecution blocks until the writer has done its job.2. If the reader app has already begun executing the query, the callis not blocked and SQL Server provides the needed isolation.I do not wish to block the readers while the update is going on.Ideally, I would like it to be such that even if the writer isupdating, the readers must continue to get the old data, that is,until the writer commits the update. However, I did not find anyisolation settings that would let me achieve this non-blockingbehavior. Am I missing something?Thank you in advance for enlightening me.Pradeep

View 1 Replies View Related

Settings Up A Connection With ODBC

May 25, 2007

ok im trying to set up an odbc connection to my database.
i am using MS SQL SERVER 2005 Express on my labtop that is running windows xp.

on the labtop i went into control panel - admin tools - data sources (odbc) and then under the user dns tab i added a sql server with these values in the fields
name: MyFoxData
Description: [i left empty]
Server: TESTINGSQLEXPRESS

then i hit next

then i have checked With Sql Server authentication using a login id and password entered by users.
i enter in my login id and password.
i then uncheck connect to sql server to obtain default settings.
i hit next and change default database to DNN445
and i leave everything else the way it is, before i save it i test the connection and it works fine.

I do the same exact steps on my desktop to try and connect to the SQL database on the labtop but for some reason i keep getting this message



Microsoft SQL Server ODBC Driver Version 03.85.1117

Running connectivity tests...

Attempting connection
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL server not found.

TESTS FAILED!


any ideas?

View 4 Replies View Related

TCP/IP Settings In SQL Server 2005

Mar 17, 2008

I recently installed SQL Server on a machine running Windows Server 2003. Before it was on my desktop. When I checked the TCP/IP settings under configuration manager, I noticed it doesnt have anything for my IP address. I just have a entry for the 127.0.01 loopback address. I know when I had it installed on my desktop there was a entry for my IP address. Is this ok or did something go wrong and it didnt set the IP address? I can still login and access the databases fine from Managament Studio.

Also would it better to have the services run as a network service or a local service?

View 6 Replies View Related







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