Monday, March 26, 2012
help! SQL server trial expired
is there anyway to import them into MSDE so I can still access them?
You can simply attach user databases to MSDE using sp_attach_db. See BOL for
syntax. This assumes they don't break the file size limits of MSDE which I
believe is 2 GB. An example below
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Data\pubs.mdf',
@.filename2 = N'c:\Data\pubs_log.ldf'
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Skylar Challand" <skylar.challand@.blatant.ca> wrote in message
news:OnrhQ9jIEHA.3444@.TK2MSFTNGP11.phx.gbl...
> My SQL Server trial has expired and now I can't seem to access my
databases,
> is there anyway to import them into MSDE so I can still access them?
>
sql
help! SQL server trial expired
is there anyway to import them into MSDE so I can still access them?You can simply attach user databases to MSDE using sp_attach_db. See BOL for
syntax. This assumes they don't break the file size limits of MSDE which I
believe is 2 GB. An example below
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Data\pubs.mdf',
@.filename2 = N'c:\Data\pubs_log.ldf'
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Skylar Challand" <skylar.challand@.blatant.ca> wrote in message
news:OnrhQ9jIEHA.3444@.TK2MSFTNGP11.phx.gbl...
> My SQL Server trial has expired and now I can't seem to access my
databases,
> is there anyway to import them into MSDE so I can still access them?
>
help! SQL server trial expired
is there anyway to import them into MSDE so I can still access them?You can simply attach user databases to MSDE using sp_attach_db. See BOL for
syntax. This assumes they don't break the file size limits of MSDE which I
believe is 2 GB. An example below
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Data\pubs.mdf',
@.filename2 = N'c:\Data\pubs_log.ldf'
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Skylar Challand" <skylar.challand@.blatant.ca> wrote in message
news:OnrhQ9jIEHA.3444@.TK2MSFTNGP11.phx.gbl...
> My SQL Server trial has expired and now I can't seem to access my
databases,
> is there anyway to import them into MSDE so I can still access them?
>
Help! SQL Express, Standard or Enterprise? or Access?
I'm not a developer and would like your input to compare against what a sales rep is telling me.
I'm managing a small web project that will have a database with a max of 20,000 records with less than 50 field each. It will be hit by anything from 200 to 500 people in a day (max) via Internet connection from all over with all sorts of speed.
The users will select less than 50 filters to obtain the results of the info they are looking for among the 20000 records. Most users will only choose less than 10 filters per search.
That's all that the database will do...seems to me enterprise is way too much, but since I'm not expert, need one of you to help with your input.
Thanks very much!
Hi,
you already said, thats this is a quite small web project. I would sugest using the SQL Server Express edition, also for the reason that it can be used for free. If you are experiencing speed problems which are based on the restrictions of Express (limitation in CPU and RAM) you can later easily upgrade to Standard Edition with just a backup and restore. You will have to keep in mind that if you are using Standard or Enterprise edition you will need either user CALs for named users or named machines. So as the rules of thumbs you will have to get CALs for very user connecting to the SQL Server. (Which is quite expensive if the server is accessible through the internet). The other option would be to get a processor license. Based on the per unit prices you can calculate the breakeven for each of the models. Be also aware that although you are using a web frontend where theoretically on one users accesses the database (e.g. the service account for the webserver) the licensing from above applies (multiplexing)
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
What about using a hosted solution? That would be cheapest and easiest way if it's available. You could get that for $5-10 a month.
|||Thank you very much. We need user CALs for named machines, so I guess I need further research on cost for that.
I truly appreciate you the taking time to answer.
|||
Tricky part I found on that is that the services that seem to meet some of our need also limit what we can do. I'm still searching this possibility, but so far, we haven't found a packaged solution. We are in Denver and are scheduling to visit a couple of host sites in the next few weeks and see how well that fits us. Once all the phases of the deployment are completed, will have users throughout the state (potentially 15K-20K) so the host site can address our cpu demands...
Txs. for the response. I'll let you know if this route works...
Help! SQL Express, Standard or Enterprise? or Access?
I'm not a developer and would like your input to compare against what a sales rep is telling me.
I'm managing a small web project that will have a database with a max of 20,000 records with less than 50 field each. It will be hit by anything from 200 to 500 people in a day (max) via Internet connection from all over with all sorts of speed.
The users will select less than 50 filters to obtain the results of the info they are looking for among the 20000 records. Most users will only choose less than 10 filters per search.
That's all that the database will do...seems to me enterprise is way too much, but since I'm not expert, need one of you to help with your input.
Thanks very much!
Hi,
you already said, thats this is a quite small web project. I would sugest using the SQL Server Express edition, also for the reason that it can be used for free. If you are experiencing speed problems which are based on the restrictions of Express (limitation in CPU and RAM) you can later easily upgrade to Standard Edition with just a backup and restore. You will have to keep in mind that if you are using Standard or Enterprise edition you will need either user CALs for named users or named machines. So as the rules of thumbs you will have to get CALs for very user connecting to the SQL Server. (Which is quite expensive if the server is accessible through the internet). The other option would be to get a processor license. Based on the per unit prices you can calculate the breakeven for each of the models. Be also aware that although you are using a web frontend where theoretically on one users accesses the database (e.g. the service account for the webserver) the licensing from above applies (multiplexing)
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
What about using a hosted solution? That would be cheapest and easiest way if it's available. You could get that for $5-10 a month.
|||Thank you very much. We need user CALs for named machines, so I guess I need further research on cost for that.
I truly appreciate you the taking time to answer.
|||
Tricky part I found on that is that the services that seem to meet some of our need also limit what we can do. I'm still searching this possibility, but so far, we haven't found a packaged solution. We are in Denver and are scheduling to visit a couple of host sites in the next few weeks and see how well that fits us. Once all the phases of the deployment are completed, will have users throughout the state (potentially 15K-20K) so the host site can address our cpu demands...
Txs. for the response. I'll let you know if this route works...
Help! Site crashing on data access when busy!
Clearly, my code isn't written as well as it should be. I don't understand enough about data access and could use some help.
I have several database tables, but one primary table that is the most accessed. Generally, I need to build a list from the data based on some filter. I'm using a repeater control, since all I need to display per record is a name, maybe a city or birthday, and possibly a little graphic, and my customer doesn't want a grid type of display. The filter is determined by the page requested. The exception is a search page where the user builds the filter and a grid is used to display the results.
The results always contain a link to a page that has more detail on the selected record.
What is the best way to handle this? I'm still trying to get a handle on different ways to get data and I'm not doing much with caching. Would it make sense to keep the data in memory from the page that displays the list (or search page) to the detail page? What if the detail page is accessed directly, say from a bookmark? How do I cache this?
I'm currently using strongly typed datasets.
Below is an example of what I'm doing - this is from the code behind of one of the list pages - members with birthdays this month.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim theMonth As String = DateTime.Now.ToString("MMMM")
Me.LabelMonth.Text = theMonth
Dim MemberAdapter As New WAPTableAdapters.membersTableAdapter
Repeater1.DataSource = MemberAdapter.GetBirthday("Female", DatePart("m", Today))
Repeater1.DataBind()
Repeater2.DataSource = MemberAdapter.GetBirthday("Male", DatePart("m", Today))
Repeater2.DataBind()
End Sub
Protected Sub Repeater1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles Repeater1.ItemDataBound
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
Dim LabelIcon As Label = CType(e.Item.FindControl("LabelIcon"), Label)
Dim person As WAP.membersRow = CType(CType(e.Item.DataItem, System.Data.DataRowView).Row, WAP.membersRow)
If System.IO.File.Exists(Server.MapPath("~/images/picts/" & person.FILE2 & ".jpg")) Then
LabelIcon.Visible = True
End If
End If
End Sub
Protected Sub Repeater2_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles Repeater2.ItemDataBound
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
Dim LabelIcon As Label = CType(e.Item.FindControl("LabelIcon"), Label)
Dim person As WAP.membersRow = CType(CType(e.Item.DataItem, System.Data.DataRowView).Row, WAP.membersRow)
If System.IO.File.Exists(Server.MapPath("~/images/picts/" & person.FILE2 & ".jpg")) Then
LabelIcon.Visible = True
End If
End If
End Sub
It seems pretty simple and straightforward to me, but these pages shouldn't be crashing when the site gets busy, so I have to be doing something wrong.
Diane
I would definitely cache the datasets. It takes so much load off.
|||How do I do that?
Diane
|||I would probably put the repeaters into a user control and use partial page caching for it. Say update once per minute should help reduce your server load, and it's really easy to implement (And since you've moved it to a user control, you can reuse it on a different page if necessary). There are obviously more efficient caching mechanisms to gain even more efficiency, but I would start with that and see if it helps since it's so easy to implement.
http://asp.net/learn/videos/video-41.aspx
|||If Cache("malebirthday") is nothing then
Dim ds as dataset = MemberAdapter.GetBirthday("Male", DatePart("m", Today))
Repeater2.DataSource = ds
Cache.Insert("malebirthday", ds, Nothing, now.addminutes(5), timespan.zero)
else
Repeater2.DataSource = Ctype(Cache("malebirthday"), dataset)
End if
Repeater2.DataBind()
Thank you! That helps tremendously.
Diane
sqlHelp! Set up Windows Group to access application
section and posted there as a force of habit.
I have an application written in VB6 that is hooked up to Sql Server 2005.
I can't seem to get a regular user to be able to access it. There's a Sql
Server error:
"Login failed for user ''. The user is not associated with a trusted Sql
Server connection." Note that it doesn't name the user; just supplies blank
single quotes together.
I want to use Windows Authentication. I set up a group in Active Directory
called CustomerService.
Can someone show me step by step how I set up the CustomerService group to
access the database MyDatabase?
Any help will be greatly appreciated!!
Sandy> "Login failed for user ''. The user is not associated with a trusted Sql
> Server connection." Note that it doesn't name the user; just supplies
> blank
> single quotes together.
I'm not sure of the significance of the empty string. Most often, the
message specifies user "(NULL)" and that means that the users Windows
credentials could not be verified and may be due to a number of different
reasons. For example, I've seen that happen when the client computer clock
was significantly different that the domain controller.
> Can someone show me step by step how I set up the CustomerService group to
> access the database MyDatabase?
You can grant all members of that AD group access to the database as
follows:
SQL 7 and SQL 2000:
EXEC sp_grantlogin 'MyDomain\CustomerService'
USE MyDatabase
EXEC sp_grantdbaccess 'MyDomain\CustomerService'
SQL 2005:
CREATE LOGIN [MyDomain\CustomerService]
FROM WINDOWS
USE MyDatabase
CREATE USER [MyDomain\CustomerService]
Hope this helps.
Dan Guzman
SQL Server MVP
"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:A3D05D3B-79C1-4318-AFE7-E65604A0EFE5@.microsoft.com...
>I am sorry for cross-posting, but I'm used to posting in the programming
> section and posted there as a force of habit.
> I have an application written in VB6 that is hooked up to Sql Server 2005.
> I can't seem to get a regular user to be able to access it. There's a Sql
> Server error:
> "Login failed for user ''. The user is not associated with a trusted Sql
> Server connection." Note that it doesn't name the user; just supplies
> blank
> single quotes together.
> I want to use Windows Authentication. I set up a group in Active
> Directory
> called CustomerService.
> Can someone show me step by step how I set up the CustomerService group to
> access the database MyDatabase?
> Any help will be greatly appreciated!!
> --
> Sandy|||You would execute something like the following:
USE master
GO
CREATE LOGIN [YourDomain\SomeGroup]
FROM WINDOWS
WITH DEFAULT_DATABASE= YourDefaultDatabaseName
GO
USE YourDatabase
GO
CREATE USER [YourDomain\SomeGroup]
FOR LOGIN [YourDomain\SomeGroup]
WITH DEFAULT_SCHEMA= YourDefaultSchemaName
That's just to access the database. Then you need to figure
out permissions in the database.
-Sue
On Mon, 14 May 2007 17:45:01 -0700, Sandy
<Sandy@.discussions.microsoft.com> wrote:
>I am sorry for cross-posting, but I'm used to posting in the programming
>section and posted there as a force of habit.
>I have an application written in VB6 that is hooked up to Sql Server 2005.
>I can't seem to get a regular user to be able to access it. There's a Sql
>Server error:
>"Login failed for user ''. The user is not associated with a trusted Sql
>Server connection." Note that it doesn't name the user; just supplies blan
k
>single quotes together.
>I want to use Windows Authentication. I set up a group in Active Directory
>called CustomerService.
>Can someone show me step by step how I set up the CustomerService group to
>access the database MyDatabase?
>Any help will be greatly appreciated!!|||Thanks for your reply, Sue.
Would I use dbo as YourDefaultSchemaName?
I need all the users in YourDomain/SomeGroup to be able to execute stored
procedures, insert, update and delete on all tables in the database. How
would I word that?
Again, any help is greatly appreciated!
--
Sandy
"Sue Hoegemeier" wrote:
> You would execute something like the following:
> USE master
> GO
> CREATE LOGIN [YourDomain\SomeGroup]
> FROM WINDOWS
> WITH DEFAULT_DATABASE= YourDefaultDatabaseName
> GO
> USE YourDatabase
> GO
> CREATE USER [YourDomain\SomeGroup]
> FOR LOGIN [YourDomain\SomeGroup]
> WITH DEFAULT_SCHEMA= YourDefaultSchemaName
> That's just to access the database. Then you need to figure
> out permissions in the database.
> -Sue
> On Mon, 14 May 2007 17:45:01 -0700, Sandy
> <Sandy@.discussions.microsoft.com> wrote:
>
>
HELP! Server Error in '/Reports' Application.
report manager.
Server Error in '/Reports' Application.
----
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: Assembly microsoft.crm.platform.types.dll security
permission grant set is incompatible between appdomains.
Source Error:
Line 5: <assemblies>
Line 6: <add assembly="Microsoft.Crm.Platform.ComProxy,
Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 7: <add assembly="Microsoft.Crm.Platform.Types,
Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 8: </assemblies>
Line 9: </compilation>
Source File: d:\inetpub\wwwroot\web.config Line: 7
----
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573You likely have a Code Access Security issue. This can be a complex issue to
describe, but Reporting Services is very fussy over code security. Basically
the default permissions of any code running in Reporting Services (RS) is
in-memory execution. Perhaps your assembly is trying to do something beyond
this. In that case you need to configure security in the files
rspreviewpolicy.config and rssrvpolicy.config. I would start by debugging
your assembly as you debug run your report from Visual Studio.
Look at the following msdn article:
http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp?frame=true
The bottom line is that you need to fully understand code access security to
deploy any custom assembly. It would be very difficult to troubleshoot what
your problem is without looking closely at your code.
Charles Kangai, MCT, MCDBA
"SAcanuck" wrote:
> Infrequently I get the following error message when trying to access the
> report manager.
>
> Server Error in '/Reports' Application.
> ----
> Configuration Error
> Description: An error occurred during the processing of a configuration file
> required to service this request. Please review the specific error details
> below and modify your configuration file appropriately.
> Parser Error Message: Assembly microsoft.crm.platform.types.dll security
> permission grant set is incompatible between appdomains.
> Source Error:
>
> Line 5: <assemblies>
> Line 6: <add assembly="Microsoft.Crm.Platform.ComProxy,
> Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> Line 7: <add assembly="Microsoft.Crm.Platform.Types,
> Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> Line 8: </assemblies>
> Line 9: </compilation>
>
> Source File: d:\inetpub\wwwroot\web.config Line: 7
>
> ----
> Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
> Version:1.1.4322.573|||Hi Charles:
Maybe Im just not understanding you...but we are using Reporting Services as
is...with no customized security. The problem is that we have MS CRM and
Reporting Services on the same server and we occassionally get the error
message.
"Charles Kangai" wrote:
> You likely have a Code Access Security issue. This can be a complex issue to
> describe, but Reporting Services is very fussy over code security. Basically
> the default permissions of any code running in Reporting Services (RS) is
> in-memory execution. Perhaps your assembly is trying to do something beyond
> this. In that case you need to configure security in the files
> rspreviewpolicy.config and rssrvpolicy.config. I would start by debugging
> your assembly as you debug run your report from Visual Studio.
> Look at the following msdn article:
> http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp?frame=true
> The bottom line is that you need to fully understand code access security to
> deploy any custom assembly. It would be very difficult to troubleshoot what
> your problem is without looking closely at your code.
> Charles Kangai, MCT, MCDBA
>
> "SAcanuck" wrote:
> > Infrequently I get the following error message when trying to access the
> > report manager.
> >
> >
> > Server Error in '/Reports' Application.
> > ----
> >
> > Configuration Error
> > Description: An error occurred during the processing of a configuration file
> > required to service this request. Please review the specific error details
> > below and modify your configuration file appropriately.
> >
> > Parser Error Message: Assembly microsoft.crm.platform.types.dll security
> > permission grant set is incompatible between appdomains.
> >
> > Source Error:
> >
> >
> > Line 5: <assemblies>
> > Line 6: <add assembly="Microsoft.Crm.Platform.ComProxy,
> > Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> > Line 7: <add assembly="Microsoft.Crm.Platform.Types,
> > Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> > Line 8: </assemblies>
> > Line 9: </compilation>
> >
> >
> > Source File: d:\inetpub\wwwroot\web.config Line: 7
> >
> >
> > ----
> > Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
> > Version:1.1.4322.573|||Greetings,
I had installed the SQL Reporting Services and then I installed the
microsoft CRM. I am facing the same error which SAcanuck is also facing.
I will really appreciate if any of you guys can help us out here.
Regards
"SAcanuck" wrote:
> Hi Charles:
> Maybe Im just not understanding you...but we are using Reporting Services as
> is...with no customized security. The problem is that we have MS CRM and
> Reporting Services on the same server and we occassionally get the error
> message.
> "Charles Kangai" wrote:
> > You likely have a Code Access Security issue. This can be a complex issue to
> > describe, but Reporting Services is very fussy over code security. Basically
> > the default permissions of any code running in Reporting Services (RS) is
> > in-memory execution. Perhaps your assembly is trying to do something beyond
> > this. In that case you need to configure security in the files
> > rspreviewpolicy.config and rssrvpolicy.config. I would start by debugging
> > your assembly as you debug run your report from Visual Studio.
> >
> > Look at the following msdn article:
> > http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp?frame=true
> >
> > The bottom line is that you need to fully understand code access security to
> > deploy any custom assembly. It would be very difficult to troubleshoot what
> > your problem is without looking closely at your code.
> >
> > Charles Kangai, MCT, MCDBA
> >
> >
> > "SAcanuck" wrote:
> >
> > > Infrequently I get the following error message when trying to access the
> > > report manager.
> > >
> > >
> > > Server Error in '/Reports' Application.
> > > ----
> > >
> > > Configuration Error
> > > Description: An error occurred during the processing of a configuration file
> > > required to service this request. Please review the specific error details
> > > below and modify your configuration file appropriately.
> > >
> > > Parser Error Message: Assembly microsoft.crm.platform.types.dll security
> > > permission grant set is incompatible between appdomains.
> > >
> > > Source Error:
> > >
> > >
> > > Line 5: <assemblies>
> > > Line 6: <add assembly="Microsoft.Crm.Platform.ComProxy,
> > > Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> > > Line 7: <add assembly="Microsoft.Crm.Platform.Types,
> > > Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> > > Line 8: </assemblies>
> > > Line 9: </compilation>
> > >
> > >
> > > Source File: d:\inetpub\wwwroot\web.config Line: 7
> > >
> > >
> > > ----
> > > Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
> > > Version:1.1.4322.573
Friday, March 23, 2012
Help! Problem with DateTime.Now and SQLServer 2005
am having a strange problem. When I set the value a column in a data
row to DateTime.Now and save it to the server the date is two days in
the future! This happens for both typed and untyped datasets.
ex DataTable dt=new DataTable("Test")
...
DataRow row = dt.Rows[0];
row["testDate"]=DataTime.Now;
...
dbAdapter.Update(dt);
the date saved will be exactly two days in the future.
The same code worked fine with Access, also I am using the OleDb
provider for SqlServerI know this is a dumb question, but what is the date and time set to on
the SLQ Server?|||Nice thought but no dice the server date time is correct|||Hello BetaD,
A couple of quick questions:
a. You did check that the local system (where the code is running) is correc
t?
b. If you're writing .NET code, are you using SqlClient or OleDbClient? If
you're using OleDbClient, why?
c. Is the datetime off in the dataset only or does it saved incorrectly to
SQL server only or is it wrong in both places?
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/sql
HELP! Passing parameters
Still need help passing a criteria parameter query from a SQL Function (i.e. @.StartDate) to a report header in Access Data Project where header = 'Transactions As Of [StartDate].
If anyone knows anywhere I can get help on this, I would really appreciate it. Thanks.
Could you explain this a bit more in detail ?
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
Wednesday, March 21, 2012
Help! Need to extract date/time from SQL database table
I can do this in MS Access where , for example only, I can convert 56323938 to "07/24/2006 11:47"
But when i attemp to extract the same info from the same field in SQL Query Analyzer, I only get "07/24/2006 00:00".
Can someone help me ? Is there a stored procedure or sql string that I can use that will in fact return the "mm/dd/yyyy hh:nn" from a timetamp field (where the hh:nn is actual and not fillers like "00:00"?
:)Dear,
The ODBC and OLE DB timestamp data type records dates and times. The Transact-SQL timestamp data type is a binary data type with no time-related values.
May You get some idea from this.otherwise there should be no problem in retrieving time through (select <date_column> from <table>),i suppose.
Regards,
Lipsa|||Try
select convert( datetime, <timestamp_column> ) from <table>
Rgds
mjg|||I now recall how i got the mm/dd/yyyy hh:mm am/pm from a timestamp
I used the following string:
select convert(datetime,cast( [timestamp] as decimal)/1440 + 1,101) from table
(timestamp is the sql encoded stamp integer field stored on a table. By converting the [timestamp] field to decimal instead of "datetime" allows the hh:mm:ss to be extracted where the "/ 1440 + 1" extracts the date from the timestamp.
:)
Quote:
Originally Posted by MikeG
Try
select convert( datetime, <timestamp_column> ) from <table>
Rgds
mjg
Monday, March 19, 2012
Help! I need to make a database driven site
can build websites (not great but OK) but i have never combined the
two thus far. However i now need to make a database driven website for
my client who has a quite large website with many visitors.
I know that they would not be happy about buying MS Sequel, however
the remote web host for their site has a MS sequel licence.
All i want to do be able to do is to design and build the database and
pages myself before it all gets uploaded to the net then i imagine i
would connect all of this up somehow (another story)
Will i need to get a MS sequel licence for my computer, if all i want
to do is design and build a database which will be hosted on a web
host that has the sequel licence, or could i use MSDE or MS Sequel
developers edition to build a database on my computer and then upload
to the web server?
Just to clarify i will be doing this all on my single computer which
isn't network and is just for little old me to design and upload
websites on.
If this is the case, could i use the familiar MS access as my front
end with MSDE or MS Sequel developers edition as the back end?For development and testing purposes you can purchase SQL Server Developer
Edition for $50. Unlike MSDE this includes the client tools such as Query
Analyzer and Enterprise Manager.
http://www.microsoft.com/sql/howtobuy/development.asp
--
David Portas
SQL Server MVP
--|||or look into the new "Sql Server 2005 Express" it is the "NEW" MSDE.
http://lab.msdn.microsoft.com/express/sql/
Cheers,
Greg Jackson
PDX, Oregon|||> If this is the case, could i use the familiar MS access as my front
> end with MSDE or MS Sequel developers edition as the back end?
For web development I'm not sure why you'd need it but yes, you can use
Access as a front-end to SQL Server.
--
David Portas
SQL Server MVP
--
Help! I need to make a database driven site
can build websites (not great but OK) but i have never combined the
two thus far. However i now need to make a database driven website for
my client who has a quite large website with many visitors.
I know that they would not be happy about buying MS Sequel, however
the remote web host for their site has a MS sequel licence.
All i want to do be able to do is to design and build the database and
pages myself before it all gets uploaded to the net then i imagine i
would connect all of this up somehow (another story)
Will i need to get a MS sequel licence for my computer, if all i want
to do is design and build a database which will be hosted on a web
host that has the sequel licence, or could i use MSDE or MS Sequel
developers edition to build a database on my computer and then upload
to the web server?
Just to clarify i will be doing this all on my single computer which
isn't network and is just for little old me to design and upload
websites on.
If this is the case, could i use the familiar MS access as my front
end with MSDE or MS Sequel developers edition as the back end?
For development and testing purposes you can purchase SQL Server Developer
Edition for $50. Unlike MSDE this includes the client tools such as Query
Analyzer and Enterprise Manager.
http://www.microsoft.com/sql/howtobuy/development.asp
David Portas
SQL Server MVP
|||or look into the new "Sql Server 2005 Express" it is the "NEW" MSDE.
http://lab.msdn.microsoft.com/express/sql/
Cheers,
Greg Jackson
PDX, Oregon
|||> If this is the case, could i use the familiar MS access as my front
> end with MSDE or MS Sequel developers edition as the back end?
For web development I'm not sure why you'd need it but yes, you can use
Access as a front-end to SQL Server.
David Portas
SQL Server MVP
HELP! How to Upsize from Access 2002 to SQL Express
Problem:
Upsize a backend MSAccess 2002 Database to SQL Express 2005
Explored:
Tried using the upsizing wizard from Office XP(2002), Two tables always get skipped.
***! The two tables skipped data only, the tablename and data structure were created.
Tried to install UPSize Pro, installation failed.
I decide to try it in VWD 2005, here is my code so far but it keeps erroring out.![]()
Dim cnAs System.Data.OleDb.OleDbConnection
Dim cmdAs System.Data.OleDb.OleDbDataAdapter
Dim dsAsNew System.Data.DataSet()
cn =New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\Documents and Settings\Bill\My Documents\Visual Studio 2005\WebSites\WebSite1\App_Data\Data for Database.mdb';Persist Security Info=True")
cmd =New System.Data.OleDb.OleDbDataAdapter("select * from Service_Orders", cn)
cn.Open()
cmd.Fill(ds)
cn.Close()
Dim connDestAsNew Data.SqlClient.SqlConnection("Data Source=WLOCKLAPTOP\SQLEXPRESS;Initial Catalog='Data for DatabaseSQLND1';Integrated Security=True")
connDest.Open()
Dim oBCPAsNew Data.SqlClient.SqlBulkCopy(connDest)
oBCP.DestinationTableName ="Service_Orders"
oBCP.WriteToServer(ds)
oBCP.Close()
connDest.Close()
It erors on Line
oBCP.WriteToServer(ds)
with.....
System.InvalidCastException was unhandled by user code
Message="Unable to cast object of type 'System.Data.DataSet' to type 'System.Data.IDataReader'."
Source="App_Web_hb6xyamq"
StackTrace:
at ASP.xfer_data_aspx.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Bill\My Documents\Visual Studio 2005\WebSites\WebSite1\xfer data.aspx:line 30
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I'm open for ANY suggestions, I do not have access to DTS, its not in the Express addition.
Thanks in advance.
Bill
|||I really appreciazte the help, using the export was a learning exprience, and also it showed the exact errors I was having. It also failed, but it gave me the reason for the failure instead of the generic 'table was skipped' error from the upsizing wizard report.
I ran this query in MS Access to 'prep' the tables before upsizing.
SELECT * FROM TableName
WHERE (((Date_Entered)<#1/1/1753# Or (Date_Entered)>#12/31/9999#));
That showed me the bad dates, there were only about four records returned from 8000. I fixed the dates, some were 2/10/085, etc, and I changed them to the real date 2/10/2005, how they got like that is beyond me.
I also had to change a field that was using currency to general number.
I ran the upsize wizard and all tables upsized.
In SQL Server Management Studio Express (Free Download and very helpful GUI from Microsoft) I then changed the old currency field to a money field without a hitch.
It seems that SQL is stricter on dates than MS Access.
Life is good!
Help! How to give replication admin access without giving system a
Currently we have a problem regarding security for replication. We have
a SQLServer that hosts about 30 databases. One of the database owner
requests that he needs to setup replication. But I don't want him to give
full 'system admin' rights to setup replication as he might mess up other
sqlserver settings and other databases that don't concern him. What is the
best way so that I can grant him enough access, so he can setup replication
for his database, and I don't have to worry about compromising the security
of other databases and the server.
Thanks
Hi Tony,
To administer replication through the enterprise manager you have to be a
member of the sysadmin role, and therefor have unlimited access to the whole
server.
The only way I can think of is to develop your own custom application using
SQL-DMO and/or SQL server ActiveX objects for administering a specific
replication.
see BOL, "Replication Programming"
Regards,
Jorgen D:
"Tony" wrote:
> Hi,
> Currently we have a problem regarding security for replication. We have
> a SQLServer that hosts about 30 databases. One of the database owner
> requests that he needs to setup replication. But I don't want him to give
> full 'system admin' rights to setup replication as he might mess up other
> sqlserver settings and other databases that don't concern him. What is the
> best way so that I can grant him enough access, so he can setup replication
> for his database, and I don't have to worry about compromising the security
> of other databases and the server.
> Thanks
>
Help! How do I create an SQL database on my machine? + Access -> SQL ?
I'm just wondering....
Is 'MS SQL' free? where can I get it?
I also have the option of creating the site round an access databse but I'm worried about the security issues,
do you think it would be wise to use access?
Is it easy to convert a site written in ASP.NET&ACCESS into a site using ASP.NET&"ms sql"?
because then I could code a site in the former on my machine and then change the code to link to an sql server.when my suport persons talking about "MS SQL" does he actually mean "msde"?
I've been having some trouble with that too:
http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=181961&Page=1#183129|||'MS SQL Server' is not free. The good news are that MS has released a scaled down version of MS Sql Server which is. It's called MSDE (MS Desktop Edition) and is ideal for developing on your local machine, as well as OK for low traffic production servers. Download ithere.|||thanks for the reply andre,
that last post went up before I read your replied,
MSDE wont install because it says I need a strong SA password but I have no idea how to set one up for my account.|||more info, I think i downloaded the wrong package file before "sql2kdesksp3" I'm now downloading sql2ksp3 is that the right onw? is the other stuff I need to download to?|||downloading msde2000a now aswell|||its still having the same SAPWD option,
Is there a detailed explanation anywhere on using the SAPWD switch or have I goy my wires crossed.
Monday, March 12, 2012
Help! Date formatting nightmare!
I converted an Access Database to SQL Express. The dates were converted to datetime
I'm using VWD 2005
Here is the source of my date and the query.
sqlDate = (DateTime.Now.AddDays(-7))
sqlTxt ="SELECT Service_Orders.SStore_Assigned_Number, Store_Info.Store_Other, Service_Orders.PO_Number, Service_Orders.SWorkType, Service_Orders.Service_Order_Number, Service_Orders.SDate_Entered, Service_Orders.SContact, Service_Orders.SClosed FROM Service_Orders INNER JOIN Store_Info ON Service_Orders.Store_ID = Store_Info.Store_ID WHERE (Service_Orders.SDate_Entered >= CONVERT(DATETIME, '" + sqlDate +"', 101)) ORDER BY Service_Orders.SDate_Entered DESC"
This retrurns 0 records.
sqlDate =11/28/2005 12:23:27 AM from the function above.
The querywill return records with :
sqlDate ="2005-11-01 21:56:20"
I tried changing the CONVERT(DATETIME, '" + sqlDate + "',1XX from 100 to 120 with no luck
I know this must be an easy fix, but it is beyond me.
I need to know how to
1. convert my date to the dateformat from "11/28/2005 12:23:27 AM" to "2005-11-01 21:56:20"
or
2. find out how to use the CONVERT(DATETIME, '" + sqlDate + "', 1XX properly
Thanks for any help in advance!
Bill
I always convert them after I recieved the data from the database so the way how you do it depends on where you handle them afterwards. Datagrid has it's own dataformatstring property and incode you can do it like this for an example:lblFormat.Text = String.Format("{0:dd.MM.yyyy}", myData("myField"))
Find outmore
|||
OK here is the problem:
When I run my query, the query return 0 rows.
I narrowed the problem down to the fact that it doesn't like my date.
I construct the date via the function sqlDate = (DateTime.Now.AddDays(-7))
When I pass that date into my query 0 rows are returned. If I hard code the date with
sqlDate ="2005-11-01 21:56:20" I get all the rows for that date.
Here is my query
sqlTxt ="SELECT Service_Orders.SStore_Assigned_Number, Store_Info.Store_Other, Service_Orders.PO_Number, Service_Orders.SWorkType, Service_Orders.Service_Order_Number, Service_Orders.SDate_Entered, Service_Orders.SContact, Service_Orders.SClosed FROM Service_Orders INNER JOIN Store_Info ON Service_Orders.Store_ID = Store_Info.Store_ID WHERE (Service_Orders.SDate_Entered >= CONVERT(DATETIME, '" + sqlDate +"', 102)) ORDER BY Service_Orders.SDate_Entered DESC"
The field SDate_Entered is a datetime field.
Who would make a product where a simple query is such a problem??
Friday, March 9, 2012
Help! Chart rendering problems (SOAP access)
I am displaying a line chart by SOAP access of reporting services. The is
rendered to my aspx page well for the first time, but if I change the
parameters, and call rs.Render, it's supposed to show a different picture,
but it's still showing the same one.
The problem is the picture always have the same name coming from the
streamID, so the IE browser get the same picture from its cache instead of
getting the image from disk.
I tried to change the StreamRoot every time, it works, but it's not what I
want.
So the question is:
Is there a way to have different streamID for a chart everytime you want to
render the chart?
Thanks!Could someone help?
"frank" wrote:
> Good day everyone!
> I am displaying a line chart by SOAP access of reporting services. The is
> rendered to my aspx page well for the first time, but if I change the
> parameters, and call rs.Render, it's supposed to show a different picture,
> but it's still showing the same one.
> The problem is the picture always have the same name coming from the
> streamID, so the IE browser get the same picture from its cache instead of
> getting the image from disk.
> I tried to change the StreamRoot every time, it works, but it's not what I
> want.
> So the question is:
> Is there a way to have different streamID for a chart everytime you want to
> render the chart?
> Thanks!
>
Help! C# - Forms - Datasource
My god.
All I want to do is post the contents of a web form to a database sql express 2005 or access using C#. Why can I find nothing for this very simple process online?
Can you tell I am totally frustrated?
So lets say i have a few text fields and I want to click submit and have that entered into a table. I use C# for code behind. So I can do basic C# programming and I can to webforms with visual web developer 2005 dragging and dropping for textboxs and a button to the aspx page. But then the mystery begins for me. How the hell do I simple post that form data to the table. I understand connection string basics. I aslo can design and create tables.
But tying this all together is becoming a problem. I don't want to use gridview formview detailview or any of that canned UI stuff. I also don't understand VB and when I see VB examples they only cloud my already cloud ASP.NET world.
Please help by posting examples, and maybe some links or books to add to my newbish collection.
Thanks,
Frank
A very simplified example. Hope that will help
<form id="form1" runat="server"> <div> <asp:TextBox ID="txtInput" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtInput" ErrorMessage="Value needed"></asp:RequiredFieldValidator> <br /> <br /> <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" /></div> </form>
and below is the button click event:
string cnStr =""//your connection string herestring valueToSave = txtInput.Text.Trim();string qry =""// your insert query here SqlConnection cn =new SqlConnection(cnStr);cn.Open();SqlCommand cm =new SqlCommand(qry, cn);int i = cm.ExecuteNonQuery();|||
Ok, this looks like what I am looking for but I have two other questions...but first here is my code:
<asp:TextBoxID="TextBox1"runat="server"></asp:TextBox><asp:ButtonID="Button1"runat="server"OnClick="Button1_Click"Text="Button"/>
<asp:LabelID="Label1"runat="server"Text="Label"></asp:Label>string cnStr ="";//connection string stuff here
string name = TextBox1.Text.Trim();
string qry ="insert into [name] value [name]";//insert statement here
SqlConnection cn =new SqlConnection(cnStr);
cn.Open();
SqlCommand cm =new SqlCommand(qry, cn);
int i = cm.ExecuteNonQuery();
when generating a connectionstring I see this in the wizard:
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True
I made a simple table called 'name' with a text field called 'name' (that sql statement up there might be incorrect as well.
My question is how do I properly format the connection string if it is in app_Data for my project called 'form'?
Second question is my SQL statement correct for inserting a value into 'name'?
Thanks,
Frank
|||
Answer to your second question is no, it will be something like - "insert into name value " ' " + name + " ' ".
And i did not get your first question. If you can provide a little more detail it will be helpful
Wednesday, March 7, 2012
HELP! - URL Access - Localhost vs. ServerName
We have a confusing problem and need some guidance.
We are trying to use URL access to generate and display a report. We have tried two ways--building the URL string and popping up a new browser with the Reporting Services URL access string and simply using an anchor tag and setting its URL parameter to the Reporting Services URL access string. Both options don't work--well, one works for the local server and the other works for client computers (not the server), but neither work for both.
Basically, we're having trouble using localhost vs. servername in our URL access string.
The examples below use localhost.
These work fine from the server which Reporting Services and IIS are running, but not from other computers (because of the "localhost").
// Build the URL for the report
url = "http://localhost/ReportServer?/Reports/MyReport&rs:Command=Render&rs:format=HTML4.0&rc:Parameters=false&rc:Zoom=Page Width";
// Build the javascript to display the message
string sScript = "<script language=\"javascript\" type=\"text/javascript\">window.open(\"" + url + "\", \"ReportsDateSelectionGenerateReport\", \"height=675,width=975,left=0,top=0,copyHistory=no,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no\");</script>";
// Execute the script
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "LinkButtonGenerateReport_Click", sScript);
<a id="runreport" runat="server" target="_blank" style="font-size: large; font-weight: bold;">View Report</a>
this.runreport.HRef = "http://localhost/ReportServer?/Reports/MyReport&rs:Command=Render&rs:format=HTML4.0&rc:Parameters=false&rc:Zoom=Page Width";
The examples below use the servername for URL access.
These work fine from other computers (because of the server name), but I get the Connect to <servername> popup asking for User name and Password when I run from the server which Reporting Services and IIS are running.
// Build the URL for the report
url = "http://" + <servername> + "/ReportServer?/Reports/MyReport&rs:Command=Render&rs:format=HTML4.0&rc:Parameters=false&rc:Zoom=Page Width";
// Build the javascript to display the message
string sScript = "<script language=\"javascript\" type=\"text/javascript\">window.open(\"" + url + "\", \"ReportsDateSelectionGenerateReport\", \"height=675,width=975,left=0,top=0,copyHistory=no,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no\");</script>";
// Execute the script
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "LinkButtonGenerateReport_Click", sScript);
<a id="runreport" runat="server" target="_blank" style="font-size: large; font-weight: bold;">View Report</a>
this.runreport.HRef = "http://" + <servername> + "/ReportServer?/Reports/MyReport&rs:Command=Render&rs:format=HTML4.0&rc:Parameters=false&rc:Zoom=Page Width";
I guess the main issue is using the servername in the URL access string pops up the connect to server dialog wanting a user name and password, even though we're trying to access the report on the server running Reporting Services and IIS. We're using Windows Authentication and impersonation (in our Web.config file), and we're logged into the server as local Administrator. Therefore, we should have no permissions issues.
How can we use the servername in URL access for both the server and client workstation to generate and display reports?
Thanks in advance.
That is very strange. You should be able to subsitute the server name for localhost on the server. Do you get this same behavior when you try this form IE?
How do you get <servername>? Is it possibly getting the wrong value when on the local machine?
|||Well, I'm always using IE. We don't support other browsers (our ASP.NET 2.0 (C#) application is an intranet application and end-users are required to use IE).
And, yes, we get the same behavior if we copy and paste the entire URL string into the browser's Address bar. It's the same thing as if we were running it through our app's code.
It seems kind of wierd to us too. It seems that if you're working on the server, using the server name should work fine (just like using "localhost").
By the way, we're working on a Win 2003 server with SP1 and using SQL Server 2005 Reporting Services. I read somewhere that the security settings in Win 2003 might be causing such an issue.
As for the servername, we're getting it using a .NET method (I can't remember right now). But, we've definitely tested this and are getting the correct server name from both the server and workstation.
So, we're stumped. Any ideas?
Thanks!
|||Is there any other .NET Framework class with a property or method that would tell whether the request is coming from a different computer or if the request is coming from the server itself?
Then I could say:
if (coming from workstation computer--not the server == true)
{
// use http://servername/ReportServer...
}
else if (coming from a browser on the server == true)
{
// use http://localhost/ReportServer...
}
Any thoughts?
|||You could always check the request IP address, but that would be masking the issue rather then fixing the cause.
Have you tried to repro this via your own web app? My guess this is more of an IIS configuration issue then an RS issue. I will have one of our other devs look over this thread and see if he has any other suggestions.