Friday, March 30, 2012
Managed Stored Procedures
VS2003 use .NET 1.1.
Good article about VB.NET and SQL/CLR: http://www.devx.com/dotnet/Article/21286
Managed replacement for SQLDMO?
Thanks,
Rainer.
In SQL Server 2005 SMO(Sql management object) replaces DMO(data management object). I don't use DMO because DMO uses the system tables in the Master database which is Microsoft property. Microsoft make changes with service packs that can affect DMO based code. Try the link below for Microsoft provided tutorial on SMO. Hope this helps.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql_ovyukondev.asp
|||Thanks. Smo was the magic word ;). I found here a good article that solves my problem:http://www.yukonxml.com/articles/smo/Rainer.
Wednesday, March 28, 2012
Manage Data
I am working on an ASP.NET web site using an SQL database.
Is there a way to Insert/Delete and Update data in the database
without creating all the forms in ASP.NET?
Since I am the only person to work with the database it would be
easier for me than creating all ASP.NET forms.
Thanks,
MiguelHi
Hmm, so get in SSMS and/or Query Builder and issue DML there.
"shapper" <mdmoura@.gmail.com> wrote in message
news:d128e2f4-c3fc-4873-b491-1ccc1ee40928@.t54g2000hsg.googlegroups.com...
> Hello,
> I am working on an ASP.NET web site using an SQL database.
> Is there a way to Insert/Delete and Update data in the database
> without creating all the forms in ASP.NET?
> Since I am the only person to work with the database it would be
> easier for me than creating all ASP.NET forms.
> Thanks,
> Miguel
Manage Data
I am working on an ASP.NET web site using an SQL database.
Is there a way to Insert/Delete and Update data in the database
without creating all the forms in ASP.NET?
Since I am the only person to work with the database it would be
easier for me than creating all ASP.NET forms.
Thanks,
Miguel
Hi
Hmm, so get in SSMS and/or Query Builder and issue DML there.
"shapper" <mdmoura@.gmail.com> wrote in message
news:d128e2f4-c3fc-4873-b491-1ccc1ee40928@.t54g2000hsg.googlegroups.com...
> Hello,
> I am working on an ASP.NET web site using an SQL database.
> Is there a way to Insert/Delete and Update data in the database
> without creating all the forms in ASP.NET?
> Since I am the only person to work with the database it would be
> easier for me than creating all ASP.NET forms.
> Thanks,
> Miguel
Monday, March 26, 2012
Making Backup pay attention ?
Hi, i have a vb.net here i have 2 timers. one look every night at 2 o'clock pm and make a backup of my sql server express database to drive c:
In the Program runs at this moment some other action and another timer that checks different things and write this to the sql database .
are the some things that i have to pay attention when i make the backup ?
Or is it equal when i make a backup and at the same time i write data ?
SQL Server is perfectly capable of taking a backup while other operations are happening. Just remember that this could have impact on performance if your hardware is not properly sized.
WesleyB
Visit my SQL Server weblog @. http://dis4ea.blogspot.com
|||Inaddition to what Wesley had said, always schedule the backup in off production hours so that the load will be less and it would'nt cause a performance bottleneck|||
though, sql server is capable of taking backup online... what i feel is its always better to take the backup after all the major activities are completed. You schedule the backup after the Program does the database activities. And also check the backup plan u need. If fullbackup is taking lot of time , take differential backup daily and weekly full backup. And also do not keep the backup and original database in the same location (c:\ which u have mentioned).
Madhu
|||Okay thank you for your reply.
but somethimes i got the following error
************** Ausnahmetext **************
System.ArgumentOutOfRangeException: no negative number necessarily (Nicht negative Zahl erforderlich.)
Parametername: count
bei System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
bei System.Data.SqlClient.TdsParserStateObject.ReadByteArray(Byte[] buff, Int32 offset, Int32 len)
bei System.Data.SqlClient.TdsParserStateObject.ReadString(Int32 length)
bei System.Data.SqlClient.TdsParser.ProcessError(Byte token, TdsParserStateObject stateObj)
bei System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
bei System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
bei System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
bei System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
This happens sometimes when i execute the following command
BACKUP DATABASE MYDBA TO DISK="c:\test.bak' WITH INIT,NOSKIP
and with this i execute it
Try
Dim cmdSQLServer As New SqlCommand
With cmdSQLServer
.CommandTimeout = 0
.CommandText = sSQLCommand
.CommandType = CommandType.Text
.Connection = g_Connection
intRowsAffected = .ExecuteNonQuery
End With
cmdSQLServer.Dispose()
Catch sqldbe As SqlException
End Try
|||Did you see that you are using double quotes before the path ? The path should be enclosed in single quotes. You could also try the SMO namespace which enabled you to administer your SQL Server in a object-oriented way.
Jens K. Suessmeyer
http://www.sqlserver2005.de
making an item repeat
databse that have dates attached. i want each record to repeat in a given
time frame according to a field in the datarow. is it possible.
someone please help my ship is sinking.
hero281Sorry.
Please provide DDL and sample data.
http://www.aspfaq.com/etiquette.asp?id=5006
AMB
"hero281" wrote:
> i have created a sql database with a vb.net front end. i have records that
> databse that have dates attached. i want each record to repeat in a given
> time frame according to a field in the datarow. is it possible.
> someone please help my ship is sinking.
> hero281|||"Alejandro Mesa" wrote:
> Sorry.
> Please provide DDL and sample data.
> http://www.aspfaq.com/etiquette.asp?id=5006
>
> AMB
> "hero281" wrote:
> > i have created a sql database with a vb.net front end. i have records that
> > databse that have dates attached. i want each record to repeat in a given
> > time frame according to a field in the datarow. is it possible.
> >
> > someone please help my ship is sinking.
> >
> > hero281
here is a sample layout of the database.
column format:
id taskname duedate freq
autonumber clean floors 06/01/06 30
" " " "
i would like to duplicate this task based on the freq.|||"hero281" <hero281@.discussions.microsoft.com> wrote in message
news:4A89D9EA-A1C0-4389-A53C-818FDB384648@.microsoft.com...
>
> "Alejandro Mesa" wrote:
> > Sorry.
> >
> > Please provide DDL and sample data.
> > http://www.aspfaq.com/etiquette.asp?id=5006
> >
> >
> > AMB
> >
> > "hero281" wrote:
> >
> > > i have created a sql database with a vb.net front end. i have records
that
> > > databse that have dates attached. i want each record to repeat in a
given
> > > time frame according to a field in the datarow. is it possible.
> > >
> > > someone please help my ship is sinking.
> > >
> > > hero281
>
> here is a sample layout of the database.
> column format:
> id taskname duedate freq
> autonumber clean floors 06/01/06 30
> " " " "
> i would like to duplicate this task based on the freq.
>
It's still not clear what you want.
Do you want something like
1 Clean Floor 06/01/06 30
1 Clean Floor 06/02/06 30
.
.
.
1 Clean Floor 06/30/06 30
?
Not really sure what you're doing then with the freq?
What if it's not the same as the number of days in the month?
>
>|||hero281,
A table of numbers will be very handy here.
Why should I consider using an auxiliary numbers table?
http://www.aspfaq.com/show.asp?id=2516
select
[id],
taskname,
duedate,
freq
from
dbo.t1
inner join
dbo.number as n
on n.number <= t1.freq
go
AMB
"hero281" wrote:
>
> "Alejandro Mesa" wrote:
> > Sorry.
> >
> > Please provide DDL and sample data.
> > http://www.aspfaq.com/etiquette.asp?id=5006
> >
> >
> > AMB
> >
> > "hero281" wrote:
> >
> > > i have created a sql database with a vb.net front end. i have records that
> > > databse that have dates attached. i want each record to repeat in a given
> > > time frame according to a field in the datarow. is it possible.
> > >
> > > someone please help my ship is sinking.
> > >
> > > hero281
>
> here is a sample layout of the database.
> column format:
> id taskname duedate freq
> autonumber clean floors 06/01/06 30
> " " " "
> i would like to duplicate this task based on the freq.
>
>
>
Friday, March 23, 2012
Making a Select between two diferent SQL Servers...Urgent please Help
Please, this is really urgent.
Thank you for your attentionLook into Linked Servers in Books Online. Then you can reference another server once it's linked to your SQL Server. HTH|||Tnks, i will do that.
Making a connection to a sql server via webmatrix
i'm making a webpage via the walkthrough of webmatrix. I use the tutorial 'Build an End-to-End Application (with C#.NET) '. The problem is that this tutorial works with an access db. I'll try to start the same thing but using an sql server.
Nowhere i can't find (because i don't look at the right place i gess) how i have to make a sqlconnection via webmatrix with c# using a keyfield to filter my data and to fill out a datagrid.
can somebody help me please ?
thnxWell, there are examples using MSDE at the same site (ASP.NET Web Matrix Project Guided Tour), so maybe you could piece it together.
The approach should be very similar -- generally you use the "Sql" prefix everywhere instead of "Oledb", and the connection string would need to be updated.
Terri|||Thnx Terri for your reply. Like you can gess i never done anything with asp or c#. I always worked with vfp and sqlserver.
Kurt|||Once you've got more of the code together, let us know if you are still having problems. We should be able to help fill in the gaps. (Although theData Access forum will probably be a better place to post since it's an ADO.Net topic.)
Terri
Monday, March 19, 2012
make stored procedure inactive?
thinking that I might have a few extra ones that are no longer used by the
application and was wondering if there is an easy way to make a stored
procedure not accessable by the web application as a way to test if it is
being used without deleting it?
Thanks
Paul G
Software engineer.
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:847134DF-FF89-48DF-8C6C-50A5720E9040@.microsoft.com...
> HI I have a large .net web application with many stored procedures. I am
> thinking that I might have a few extra ones that are no longer used by the
> application and was wondering if there is an easy way to make a stored
> procedure not accessable by the web application as a way to test if it is
> being used without deleting it?
> Thanks
> --
> Paul G
> Software engineer.
I would simply rename the object to something else.
Take a look at sp_rename in the BOL.
Rick Sawtell
MCT, MCSD, MCDBA
|||ok thanks will give it a try.
Paul G
Software engineer.
"Paul" wrote:
> HI I have a large .net web application with many stored procedures. I am
> thinking that I might have a few extra ones that are no longer used by the
> application and was wondering if there is an easy way to make a stored
> procedure not accessable by the web application as a way to test if it is
> being used without deleting it?
> Thanks
> --
> Paul G
> Software engineer.
|||Paul,
Revoke / Deny the execute permission from application database user.
Take a look into Revoke / Deny in books online.
Thanks
Hari
SQL Server MVP
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:05F662B0-1AB8-4629-8BD8-1F3AA1968CCE@.microsoft.com...[vbcol=seagreen]
> ok thanks will give it a try.
> --
> Paul G
> Software engineer.
>
> "Paul" wrote:
|||Ok thanks, I think this will work as I have set up a user and password that
the applications uses so should be able to deny execution using enterprise
manager.
Paul G
Software engineer.
"Hari Prasad" wrote:
> Paul,
> Revoke / Deny the execute permission from application database user.
> Take a look into Revoke / Deny in books online.
> Thanks
> Hari
> SQL Server MVP
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:05F662B0-1AB8-4629-8BD8-1F3AA1968CCE@.microsoft.com...
>
>
make stored procedure inactive?
thinking that I might have a few extra ones that are no longer used by the
application and was wondering if there is an easy way to make a stored
procedure not accessable by the web application as a way to test if it is
being used without deleting it?
Thanks
--
Paul G
Software engineer."Paul" <Paul@.discussions.microsoft.com> wrote in message
news:847134DF-FF89-48DF-8C6C-50A5720E9040@.microsoft.com...
> HI I have a large .net web application with many stored procedures. I am
> thinking that I might have a few extra ones that are no longer used by the
> application and was wondering if there is an easy way to make a stored
> procedure not accessable by the web application as a way to test if it is
> being used without deleting it?
> Thanks
> --
> Paul G
> Software engineer.
I would simply rename the object to something else.
Take a look at sp_rename in the BOL.
Rick Sawtell
MCT, MCSD, MCDBA|||ok thanks will give it a try.
--
Paul G
Software engineer.
"Paul" wrote:
> HI I have a large .net web application with many stored procedures. I am
> thinking that I might have a few extra ones that are no longer used by the
> application and was wondering if there is an easy way to make a stored
> procedure not accessable by the web application as a way to test if it is
> being used without deleting it?
> Thanks
> --
> Paul G
> Software engineer.|||Paul,
Revoke / Deny the execute permission from application database user.
Take a look into Revoke / Deny in books online.
Thanks
Hari
SQL Server MVP
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:05F662B0-1AB8-4629-8BD8-1F3AA1968CCE@.microsoft.com...[vbcol=seagreen]
> ok thanks will give it a try.
> --
> Paul G
> Software engineer.
>
> "Paul" wrote:
>|||Ok thanks, I think this will work as I have set up a user and password that
the applications uses so should be able to deny execution using enterprise
manager.
--
Paul G
Software engineer.
"Hari Prasad" wrote:
> Paul,
> Revoke / Deny the execute permission from application database user.
> Take a look into Revoke / Deny in books online.
> Thanks
> Hari
> SQL Server MVP
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:05F662B0-1AB8-4629-8BD8-1F3AA1968CCE@.microsoft.com...
>
>
make stored procedure inactive?
thinking that I might have a few extra ones that are no longer used by the
application and was wondering if there is an easy way to make a stored
procedure not accessable by the web application as a way to test if it is
being used without deleting it?
Thanks
--
Paul G
Software engineer."Paul" <Paul@.discussions.microsoft.com> wrote in message
news:847134DF-FF89-48DF-8C6C-50A5720E9040@.microsoft.com...
> HI I have a large .net web application with many stored procedures. I am
> thinking that I might have a few extra ones that are no longer used by the
> application and was wondering if there is an easy way to make a stored
> procedure not accessable by the web application as a way to test if it is
> being used without deleting it?
> Thanks
> --
> Paul G
> Software engineer.
I would simply rename the object to something else.
Take a look at sp_rename in the BOL.
Rick Sawtell
MCT, MCSD, MCDBA|||ok thanks will give it a try.
--
Paul G
Software engineer.
"Paul" wrote:
> HI I have a large .net web application with many stored procedures. I am
> thinking that I might have a few extra ones that are no longer used by the
> application and was wondering if there is an easy way to make a stored
> procedure not accessable by the web application as a way to test if it is
> being used without deleting it?
> Thanks
> --
> Paul G
> Software engineer.|||Paul,
Revoke / Deny the execute permission from application database user.
Take a look into Revoke / Deny in books online.
Thanks
Hari
SQL Server MVP
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:05F662B0-1AB8-4629-8BD8-1F3AA1968CCE@.microsoft.com...
> ok thanks will give it a try.
> --
> Paul G
> Software engineer.
>
> "Paul" wrote:
>> HI I have a large .net web application with many stored procedures. I am
>> thinking that I might have a few extra ones that are no longer used by
>> the
>> application and was wondering if there is an easy way to make a stored
>> procedure not accessable by the web application as a way to test if it is
>> being used without deleting it?
>> Thanks
>> --
>> Paul G
>> Software engineer.|||Ok thanks, I think this will work as I have set up a user and password that
the applications uses so should be able to deny execution using enterprise
manager.
--
Paul G
Software engineer.
"Hari Prasad" wrote:
> Paul,
> Revoke / Deny the execute permission from application database user.
> Take a look into Revoke / Deny in books online.
> Thanks
> Hari
> SQL Server MVP
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:05F662B0-1AB8-4629-8BD8-1F3AA1968CCE@.microsoft.com...
> > ok thanks will give it a try.
> > --
> > Paul G
> > Software engineer.
> >
> >
> > "Paul" wrote:
> >
> >> HI I have a large .net web application with many stored procedures. I am
> >> thinking that I might have a few extra ones that are no longer used by
> >> the
> >> application and was wondering if there is an easy way to make a stored
> >> procedure not accessable by the web application as a way to test if it is
> >> being used without deleting it?
> >> Thanks
> >> --
> >> Paul G
> >> Software engineer.
>
>
Make Connection to SOAP endpoint without integrated login?
I have a endpoint on our SQL Server and I've written a test .Net app to access it and it all works great. It uses the Integrated Login for Authentication.
My project in the end will have connections made to the endpoint via some custom code on a Non Windows/Linux platform. My concern is that there is no Authentication method that I can use from this client. Integrated is out since it not something you log into. SSL is out since there is no Cert store. Isn't there a way to use the SQL Authentication in a Mixed mode SQL Authentication install?
What are my other options? I need to be able to get data from our SQL server from this custom platform. We looked into using TDS protocol, but would rather not have to license it and develop a client on our platform. We wanted to just generate the HTTP Packets to send and receive the data.
Thank you,
Scott<-
SQL SOAP always requires integrated login first before you can use SQL login. You should try digest it should work from a non-MS platform.