Showing posts with label company. Show all posts
Showing posts with label company. Show all posts

Friday, March 23, 2012

Help on how to 1 way push data

Hi there
Maybe Im missing something but..
I have a order tracking system running on sales peoples laptop's. When they connect to the company Network (via dialup) at Night I want to push all off there orders to a named SQL, and then remove those orders from their own laptop.
So in a sense, Its like a one way merge with a delete, or even a push from MSDE to the main SQL server.
I dont want existing data pushed back to the laptop.. SO its all one way.
Any ideas? or help
Ryan,
I have seen merge used for this - you can have a filter of 1=2 on the
tables. This ensures that subscriber inserts are replicated to teh
publisher, and then deletes are replicated back because the filter is not
satisfied. However, this can be a bit buggy if inserts are still carried out
on the subscriber while the merge agent is running (some of the new rows
won't be removed when next running the merge agent). Provided you can
prevent this, or it won't happen in your particular business, then this is a
viable solution.
Alternatively, each laptop could be configured as a transactional publisher
with HO as a central subscriber and for the delete command, 'none' is
entered to prevent the replication of deletes.
Finally, you could use DTS/linked servers to accomplish the same thing.
Regards,
Paul Ibison
|||Hi Paul
Thanks for your reply. Could you just explain the
> you can have a filter of 1=2 on the
> tables. This ensures that subscriber inserts are replicated to teh
> publisher, and then deletes are replicated back because the filter is not
> satisfied.
please as this sounds about the right way - as the users will not be adding new records at the time of syncronisation (they are basically using the Win Xp Syncronisation tool i.e. Annonymous.
|||Ryan,
in the filter section of the publication properties, on the filter rows tab
you specify this filter:
SELECT <published_columns> FROM [dbo].[yourtable] WHERE 2=1
HTH,
Paul Ibison

Wednesday, March 21, 2012

Help on a SQL query

Hello guys,
maybe you can point me into the right direction on this SQL Query that
is driving me crazy:

I've got the following table:

Contact Company Job_Title Importance
1 Company A CEO 10
2 Company A DIR 9
3 Company B MAN 5
4 Company B DIR 9
5 Company C PRG 4

I need to extract a single value, for each company, with the highest
contact (through the "importance" field).

In the example, I would need to have the following results:

Contact Company Job_Title Importance
1 Company A CEO 10
4 Company B DIR 9
5 Company C PRG 4

...any idea about how can i do it ?

Thanks very much fo your help
MassiHere's one option:

select
t.Contact,
t.Company,
t.Job_Title,
t.Importance
from
dbo.MyTable t
join
(
select Company, max(Importance) as 'Importance'
from dbo.MyTable
) dt
on t.Company = dt.Company
and t.Importance = dt.Importance

Simon|||Unfortunately is not working ...

It returns the following result set:

Contact Company
Job Title Importance
10000000000016374721000000000001587309CCM200
10000000000016374721000000000001587309CCM200
10000000000016374721000000000001587309CCM200
10000000000016374721000000000001587309CCM200

I need the company field to be unique in the resultset. Moreover, I
don't understand where it has taken the value 200 for importance (on DB
values range from 0 to 170)...

Still thanks for your help
Massi|||group by is missing:

Here's one option:

select
t.Contact,
t.Company,
t.Job_Title,
t.Importance
from
dbo.MyTable t
join
(
select Company, max(Importance) as 'Importance'
from dbo.MyTable
-----
GROUP BY COMPANY
----
) dt
on t.Company = dt.Company
and t.Importance = dt.Importance

Simon|||Oops, sorry - I left out the GROUP BY:

select
t.Contact,
t.Company,
t.Job_Title,
t.Importance
from
dbo.MyTable t
join
(
select Company, max(Importance) as 'Importance'
from dbo.MyTable
group by Company
) dt
on t.Company = dt.Company
and t.Importance = dt.Importance

If this still doesn't work as you require, I suggest you post CREATE
TABLE and INSERT statements to show a test case:

http://www.aspfaq.com/etiquette.asp?id=5006

Simonsql

Help New to SQL server

Im working for a company that has a relatively small database but will continue growing. We would like to use SQL server to accomodate the mass users who will be accessing the data. I have never used sql server and would like to know where to get started. IE. books, websites(besides this one), prices. what will i need to get this database up and running?? I would like to have sql server as my backend and microsoft access as my frontend. any help would be greatly appriciated.

thanxhttp://www.sqlteam.com/store.asp

I would rethink Access as a front end...but that's just me...

Have you seen how much sql server costs?

You might want to look into MSDE...

How many users?

How much data are you talking about...

Is it internal to one office?

What is the application meant to do?|||Originally posted by Brett Kaiser
http://www.sqlteam.com/store.asp

I would rethink Access as a front end...but that's just me...

Have you seen how much sql server costs?

You might want to look into MSDE...

How many users?

How much data are you talking about...

Is it internal to one office?

What is the application meant to do?

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

Why would you rethink Access?? What else would you use as a frontend?

Cost is not an issue. How mush is it?

What is MSDE (microsoft developer edition??)

mmm possibly 200 users accessing from the web and 6 users from the office.

The data right now is about 40mb. I know this isnt alot. i could create the database in access then when necessary move it to SQL server, but access cant handle the amount of users i need.

The database will keep track of all billings, customer info, shipping infosql

Friday, February 24, 2012

HELP ME PLEASE! GODADDY - ASPNETDB Security DB

Hi,

I have two sql db's. One for company record info, other for users (aspnetdb) I created the users one using the login control and web administration wizard. This all worked well until I had to publish to godaddy. I had to rebuild my company db, but eventually I was able to pull info and all that is working. The problem is, how the heck do I add users? I noticed that it put users table in my db to start. So I manually went into the db on godaddy's servers, and added an application. Then when I tried to add a user manually, it kept giving me errors. Is there an easier way to add website users through godaddy? Something like the web admin tool that comes with visual studio? Man it is driving me crazy!!!

For the poor man's approach, you can upload a file from the learnvisualstudio.net tutorials (begennirs lesson 09),

Signup.aspx

<%@. Page Language="C#" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<script runat="server"
</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#F7F7DE" BorderColor="#CCCC99"
BorderStyle="Solid" BorderWidth="1px" ContinueDestinationPageUrl="~/Default.aspx"
Font-Names="Verdana" Font-Size="10pt" Style="z-index: 100; left: 241px; position: absolute;
top: 152px">
<WizardSteps>
<asp:CreateUserWizardStep runat="server">
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep runat="server">
</asp:CompleteWizardStep>
</WizardSteps>
<SideBarStyle BackColor="#7C6F57" BorderWidth="0px" Font-Size="0.9em" VerticalAlign="Top" />
<TitleTextStyle BackColor="#6B696B" Font-Bold="True" ForeColor="#FFFFFF" />
<SideBarButtonStyle BorderWidth="0px" Font-Names="Verdana" ForeColor="#FFFFFF" />
<NavigationButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="#FFFFFF" HorizontalAlign="Center" />
<CreateUserButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
<ContinueButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
<StepStyle BorderWidth="0px" />
</asp:CreateUserWizard>

</div>
</form>
</body>
</html
And here's my Web.config file:

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<!--
<trace enabled="true" requestLimit="50" localOnly="false"/>
-->
<compilation debug="true"/>
<roleManager enabled="true"/>
<customErrors mode="Off"/>
<authentication mode="Forms"/
<membership defaultProvider="MySqlMembershipProvider" >
<providers>
<clear/>
<add name="MySqlMembershipProvider"
connectionStringName="MyLocalSQLServer"
applicationName="MyAppName"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
</system.web
<connectionStrings>
<add name="MyLocalSQLServer"
connectionString="Data Source=whsql-v01.prod.mesa1.secureserver.net;Initial Catalog=DB_nnnnn;User ID=user;Password=password;" />
</connectionStrings
</configuration
|||I'd like to know if there is decent user management app for this.

Also when I work with Roles I run into errors. Since I don't have access to the ASP.NET configuration tool I'm notsure if Role Management Enabled is checked on godaddy servers or ifthis would even matter for this app.

Here's my error screen.

Server Error in '/' Application.

TheSSE Provider did not find the database file specified in the connectionstring. At the configured trust level (below High trust level), the SSEprovider can not automatically create the database file.

Description:Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.

Exception Details:System.Configuration.Provider.ProviderException:The SSE Provider did not find the database file specified in theconnection string. At the configured trust level (below High trustlevel), the SSE provider can not automatically create the database file.

Source Error:

Line 11: }
Line 12:
Line 13: if (Roles.IsUserInRole("Basic User") == false)
Line 14: Server.Transfer("unauthorized.aspx");
Line 15: }


Source File: d:\Hosting\javagrinder\SecurePage.aspx Line: 13

Stack Trace:

[ProviderException: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.]
System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(String connectionString) +2466581
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +87
System.Web.Security.SqlRoleProvider.GetRolesForUser(String username) +771
System.Web.Security.RolePrincipal.IsInRole(String role) +272
System.Web.Security.Roles.IsUserInRole(String username, String roleName) +533
System.Web.Security.Roles.IsUserInRole(String roleName) +16
ASP.securepage_aspx.form1_Load(Object sender, EventArgs e) in d:\Hosting\javagrinder\SecurePage.aspx:13
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42|||Hi JavaGrinder, have you tried setting the trust level higher (e.g. "Full")?|||

Lori,

Can you explain how to do that? That may solve another problem I am running into...

Thanks!

|||Ah, that's probably the problem. I get the following error, and am contacting godaddy to see if I can have them unlock this and allow overrides for sites upon request.

I suspect there is something more to it since I'm having troubles adding roles to the tables from their SQL server manager. I can add users and applications from that panel, but not Roles.

Server Error in '/' Application.

Configuration Error

Description:Anerror occurred during the processing of a configuration file requiredto service this request. Please review the specific error details belowand modify your configuration file appropriately.

Parser Error Message:Thisconfiguration section cannot be used at this path. This happens whenthe site administrator has locked access to this section using<location allowOverride="false"> from an inherited configurationfile.

Source Error:

Line 22: </providers>
Line 23: </membership>
Line 24: <trust level="Full"/>
Line 25: </system.web>
Line 26: </location>


Source File: d:\hosting\javagrinder\web.config Line: 24


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42|||

Java,

Let me know how this goes... I am trying to run the reportviewer control from their servers and it gives me permssion errors. I have heard that the reportviewer control requires full trust. Please let me know if they allow you to use full trust.

Thanks!

|||

Oh and by the way Java, I had asked Godaddy before about the trust level and all they kept saying was that I could create folders myself. I don't think they really had a clue what I was talking about... Good luck and let me know how it goes!! I might have to end up swiching host since I need this reportviewer control to work..

Thanks!

|||They say on shared hosting the trust level is set to medium. You have to have a dedicated hosting account to increase it to full.|||Ok, so after talking to godaddy support (useless) I started searching around on google again. I don't know where I got this web.config, but it works for me. Maybe it will work for report viewer.

-Jon

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"
<location allowOverride="true"
<system.web>
<!--
<trace enabled="true" requestLimit="50" localOnly="false"/>
-->
<compilation debug="true"/>
<!-- roleManager enabled="true"/ -->
<customErrors mode="Off"/>
<authentication mode="Forms"/>
<membership
<providers
<remove name="AspNetSqlMembershipProvider" /
<add name="AspNetSqlMembershipProvider"

type="System.Web.Security.SqlMembershipProvider,

System.Web, Version=2.0.0.0, Culture=neutral,

PublicKeyToken=b03f5f7f11d50a3a"

connectionStringName="MyLocalSQLServer"

enablePasswordRetrieval="false"

enablePasswordReset="true"

requiresQuestionAndAnswer="true"

applicationName="/"

requiresUniqueEmail="false"

passwordFormat="Hashed"

maxInvalidPasswordAttempts="5"

minRequiredPasswordLength="7"

minRequiredNonalphanumericCharacters="1"

passwordAttemptWindow="10"

passwordStrengthRegularExpression="" /
</providers
</membership
<profile
<providers
<remove name="AspNetSqlProfileProvider" /
<add name="AspNetSqlProfileProvider"

connectionStringName="MyLocalSQLServer"

applicationName="/"

type="System.Web.Profile.SqlProfileProvider,

System.Web, Version=2.0.0.0, Culture=neutral,

PublicKeyToken=b03f5f7f11d50a3a" /
</providers>

</profile
<roleManager enabled="true">

<providers
<remove name="AspNetSqlRoleProvider" /
<add name="AspNetSqlRoleProvider"

connectionStringName="MyLocalSQLServer"

applicationName="/"

type="System.Web.Security.SqlRoleProvider,

System.Web, Version=2.0.0.0, Culture=neutral,

PublicKeyToken=b03f5f7f11d50a3a" /
</providers
</roleManager>
<!--
<membership defaultProvider="MySqlMembershipProvider" >
<providers>
<clear/>
<add name="MySqlMembershipProvider"
connectionStringName="MyLocalSQLServer"
applicationName="MyAppName"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
-->
</system.web>
</location>
<connectionStrings>
<add name="MyLocalSQLServer"
connectionString="Data Source=whsql-v01.prod.mesa1.secureserver.net;Initial Catalog=DB_nnnnnn;User ID=userid;Password=password;" />
</connectionStrings
</configuration>|||

Didn't work for me :( I still get this error...

Required permissions cannot be acquired.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Security.Policy.PolicyException: Required permissions cannot be acquired.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[PolicyException: Required permissions cannot be acquired.] System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +2737861 System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57[FileLoadException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)] System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211 System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141 System.Reflection.Assembly.Load(String assemblyString) +25 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +3479081 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177 System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +267 System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +36 System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +429 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +73 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +580 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +111 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +54 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Sunday, February 19, 2012

Help me justify sql 2005 investing proyect to my boss.

Hello.

My company is very new to the Microsoft World, they are experts on java, ibm
db2, oracle. etc for 8 years but now they are investing on .net and
microsoft products. I want to justify to my boss to work on day hours
investigatin sql 2005. Can somebody tell me how to justify this?
Why can it be better than oracle or db2?

ThanksHello Luis,

I would suggest taking a look at the SQL 2005 testimonials and case studies at:
http://www.microsoft.com/sql/2005/productinfo/testimonials.mspx

If you really want to build a strong argument, I would suggest using SQL 2000's case studies as a ramp up to the 2005 material. There is a virtual treasure trove of examples showing productivity and cost savings there at:
http://www.microsoft.com/sql/evaluation/casestudies/alphalisting.asp

Hope this helps,