Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Thursday, March 29, 2012

database connection

i have database in SQL server .. how can i connect to web page

Please help

many many thanks

Why don't you take a stab at the code and then paste when you have problems.

Search Google for "SQL Server Connect ASP.NET 2.0" and you will get a zillion hits. One of them looks promising.

http://aspnet.4guysfromrolla.com/articles/022206-1.aspx

If you try to do the task and then post a more targeted question, you will likely get better results posting.

Good luck, and do come back with more specific questions.

sql

database compatibility between sql 2005 standard v/s sql 2005 64 bit

I am a newbie developing a web site. My local machine has sql 2005 standard edition on it. The host that I am trying to use only has sql 2005 64 bit version.

would I be able to do the use the same database between the two ( i.e. once my site is running at host, would I be able to download the database on my local machine, make changes to my site and then upload again on the hose without any glitches?). In addition, how about sql express doing the same with sql 2005 64 bit.

Thanks a lot for taking time to read the post.

get a new host lol...come to my employeer, www.hosting.com. we offer express & std 32BIT lol who only offers 64bit.

Thursday, March 8, 2012

Database Administration/Maintenance - Guidance Needed

I have been working SQL server for many years as a web developer, however in my current position we are lacking an expert in maintenance and admninistration as the company has recently switched over to SQL Server 2005.

I therefore need to develop a greater understanding of the best practices with regards to administration and am a bit lost as there are so many options which seem like they might match my requirements. As I have never looked beyond the basic administration/maintenance side of things before I have no idea which options to investigate.

Basically I want to clear any records older than 3 months old on a scheduled/automatic basis. There seem to be various options that could do this, however I want to know what the best option is, rather than waste a lot of time and risk problems by resorting to trial and error.

We are already backing up this data, however I am not sure if I should combine these tasks. It is highly unlikely that we will ever have to restore these older records, however we do need to store the data for legal reasons.

I dont expect anyone to tell me everything, as I am happy to investigate, I just need a nudge in the right direction.

Thanks

maw

Hi there,

Do you have an easy way of distinguishing what records you want to delete (e.g. the records have a timestamp field associated with them)?

I would define a SQL Agent job that runs as per your desired schedule and executes some T-SQL that will delete the records as required.

In terms of backups, I would be tempted to take a "before" and "after" backup of the data. You can work the "before" backup into your regularly scheduled backup routine. For example (times are example only):

2:00am Regularly scheduled backup job runs and takes DB backup

2:30am Job to cull records older than 3 months fires & as part of the job execution, after all the cull logic has fired a BACKUP DATABASE statement is issued.

Thus, your job to cull records older than 3 months would look like:

/*
BEGIN: T-SQL statements for job
*/
-- Logic for deleting records
DELETE....
DELETE....

-- Backup after changes
BACKUP DATABASE Test_DB
TO DISK = 'C:\Backup_After_Delete.bak'
./*
END: T-SQL statements for job
*/

Hope that helps a bit, but sorry if it didn't
|||

Thanks Nate, thats exactly what I needed to know.

I had already read up a little bit on setting it up as a job, however I wasnt sure it was the best method.

I do have timestamp fields set up, so this should work perfectly.

Thanks again for your help.

Database Access over Internet

I was wondering if any body has used Internet as a WAN (Wide Area
Network) to provide database access. I know about web services but I
like to experiment with using Internet as a extended network (web
server behind one router and database behind another). Any ideas on
where to look for this?

ThanksHi

Are you talking about a VPN? Check on whether your firewall(s) will support
this.
Also:
http://support.microsoft.com/defaul...kb;en-us;323441

John

<le_mo_mo@.yahoo.com> wrote in message
news:1129345377.971147.100230@.f14g2000cwb.googlegr oups.com...
>I was wondering if any body has used Internet as a WAN (Wide Area
> Network) to provide database access. I know about web services but I
> like to experiment with using Internet as a extended network (web
> server behind one router and database behind another). Any ideas on
> where to look for this?
> Thanks|||<le_mo_mo@.yahoo.com> wrote in message
news:1129345377.971147.100230@.f14g2000cwb.googlegr oups.com...
>I was wondering if any body has used Internet as a WAN (Wide Area
> Network) to provide database access. I know about web services but I
> like to experiment with using Internet as a extended network (web
> server behind one router and database behind another). Any ideas on
> where to look for this?
> Thanks

Not the internet, but I used a wide area network a few years ago to
replicate a large SQL Server database across. The WAN ran at 64kbps, and it
struggled but we were replicating across half a dozen production sites.

So be aware that there may be a serious performance hit - it depends a lot
on the upload and download speeds at both ends of the connection and the
types of queries that you might be doing. Timeouts may also be an issue. Do
a serious assessment of the volumes of data you are likely to be moving.

As John has rightly pointed out, use a VPN.

Hope this helps.
--
Brian Cryer
www.cryer.co.uk/brian|||le_mo_mo@.yahoo.com wrote:
> I was wondering if any body has used Internet as a WAN (Wide Area
> Network) to provide database access. I know about web services but I
> like to experiment with using Internet as a extended network (web
> server behind one router and database behind another). Any ideas on
> where to look for this?
> Thanks
Interesting idea,

Personally, I wouldn't trust public access without being able to filter
traffic though a PIX and a web service but please let me know how you
get on.

Regards

Jon

Friday, February 17, 2012

Data Type

I am a SQL newbie! What is the correct datatype to use, if I want to record
a checkbox from a web form? Thanks,
DarrenScrappy (celtics@.lan-specialist.com) writes:
> I am a SQL newbie! What is the correct datatype to use, if I want to
> record a checkbox from a web form? Thanks,

The most natural type to use would be bit, which only can hold the values 0
or 1.

If you want to stick to standards, you may avoid this datatype since it
is propritary to SQL Server and Sybase (or at least so claims Joe Celko).
In such case a char(1) column with the values T/F ot Y/N could be an
alternative. Or a tinyint column with the values 0/1.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Erland Sommarskog" <sommar@.algonet.se> wrote in message news:Xns93ACF34D8F415Yazorman@.127.0.0.1...
> Scrappy (celtics@.lan-specialist.com) writes:
> > I am a SQL newbie! What is the correct datatype to use, if I want to
> > record a checkbox from a web form? Thanks,
> The most natural type to use would be bit, which only can hold the values 0
> or 1.
> If you want to stick to standards, you may avoid this datatype since it
> is propritary to SQL Server and Sybase (or at least so claims Joe Celko).

Hi Erland, actually, BIT, and the more general BIT(n), are defined in both
SQL:1992 and SQL:1999. I believe the difference is that the Standard
requires a bit string literal to be written like B'1'. Not sure if the integer
1 would be automatically cast to B'1' but seems reasonable.

Regards,
jag

> In such case a char(1) column with the values T/F ot Y/N could be an
> alternative. Or a tinyint column with the values 0/1.
> --
> Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||>> the more general BIT(n), are defined in both SQL:1992 and SQL:1999 <<

Yes, and in the Standards, you treat them as if they were character
strings. The operations are bit string comparison, assignment, bit
concatenation operator, bit substring function, length, and position.
You do not have bit-wise operators like you do in T-SQL or assembly
language.

When you try to use them with a host languages, you get all kinds of
problems -- high end or low end bytes? Does 0 or 1 mean "TRUE"?

--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!