Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Wednesday, March 28, 2012

One EMail for Multiple Notification Types

I have 5 notification classes that a user can subscribe to. If they subscribe to 2 different notification types, can notifications from both of those subscriptions be sent in one e-mail?

I understand digesting but I think it only applies to combining multiple notifications within a given notification class. True?

Any idea if I can notification from 2 different notification classes into one e-mail to the subscriber?

Thanks, Dan

Hi Dan -

You're right, there's nothing built into SSNS that will allow you to digest notifications across different notification classes. There reason is that those notification classes could vary widely in their composition.

HTH...

Joe

One EMail for Multiple Notification Types

I have 5 notification classes that a user can subscribe to. If they subscribe to 2 different notification types, can notifications from both of those subscriptions be sent in one e-mail?

I understand digesting but I think it only applies to combining multiple notifications within a given notification class. True?

Any idea if I can notification from 2 different notification classes into one e-mail to the subscriber?

Thanks, Dan

Hi Dan -

You're right, there's nothing built into SSNS that will allow you to digest notifications across different notification classes. There reason is that those notification classes could vary widely in their composition.

HTH...

Joe

One Date field with different dates

I want to search on a date field with user input. How can I make it to where
it will give user a startdate and an enddate box? Remember I have only one
date field.
SELECT COURSE_NBR, ATTEND, COMPL_DATE
FROM EH_MEMINFO_1
WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
(COMPL_DATE LIKE @.COMPL_DATE)
Thanks fo ryour help.Use this:
SELECT COURSE_NBR, ATTEND, COMPL_DATE
FROM EH_MEMINFO_1
WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
(COMPL_DATE BETWEEN @.StartDate AND @.EndDate)
"Shan" wrote:
> I want to search on a date field with user input. How can I make it to where
> it will give user a startdate and an enddate box? Remember I have only one
> date field.
> SELECT COURSE_NBR, ATTEND, COMPL_DATE
> FROM EH_MEMINFO_1
> WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
> (COMPL_DATE LIKE @.COMPL_DATE)
> Thanks fo ryour help.|||O Thank you soo much...that solved lots of problems.
Great Daw!
"daw" wrote:
> Use this:
> SELECT COURSE_NBR, ATTEND, COMPL_DATE
> FROM EH_MEMINFO_1
> WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
> (COMPL_DATE BETWEEN @.StartDate AND @.EndDate)
>
> "Shan" wrote:
> > I want to search on a date field with user input. How can I make it to where
> > it will give user a startdate and an enddate box? Remember I have only one
> > date field.
> >
> > SELECT COURSE_NBR, ATTEND, COMPL_DATE
> > FROM EH_MEMINFO_1
> > WHERE (COURSE_NBR LIKE @.COURSE_NBR) or
> > (COMPL_DATE LIKE @.COMPL_DATE)
> >
> > Thanks fo ryour help.

One data file per CPU.. Why ?

They say tempdb requires one data file per CPU. Why ?
Also, why just tempdb ? Why not every user database to have the same
requirement of one data file per CPU?
Thanks
Who is "they say"? If youa re referring to the KBs that MS put out they
actually explain why. But in a nutshell it is because tempdb by nature
creates a lot of new tables and extents where as a user db normally only
creates new objects occasionally. There is contention on the portion of the
file that holds this information when you create lots of new objects
concurrently in SQL2000. Each file has its own allocation unit so you
effectively spread the load across each of the files. But I would read the
articles for more details.
Andrew J. Kelly SQL MVP
"Hassan" <Hassan@.hotmail.com> wrote in message
news:OEXgpr1NHHA.4376@.TK2MSFTNGP03.phx.gbl...
> They say tempdb requires one data file per CPU. Why ?
> Also, why just tempdb ? Why not every user database to have the same
> requirement of one data file per CPU?
> Thanks
>
|||Hi Hassan
To add to Andrews suggestion as well as the KB issue on this I suggest you
also read Kalen Delaney's "Inside Microsoft SQL Server 2005: The Storage
Engine" ISBN 0735621055
John

One data file per CPU.. Why ?

They say tempdb requires one data file per CPU. Why ?
Also, why just tempdb ? Why not every user database to have the same
requirement of one data file per CPU?
ThanksWho is "they say"? If youa re referring to the KBs that MS put out they
actually explain why. But in a nutshell it is because tempdb by nature
creates a lot of new tables and extents where as a user db normally only
creates new objects occasionally. There is contention on the portion of the
file that holds this information when you create lots of new objects
concurrently in SQL2000. Each file has its own allocation unit so you
effectively spread the load across each of the files. But I would read the
articles for more details.
Andrew J. Kelly SQL MVP
"Hassan" <Hassan@.hotmail.com> wrote in message
news:OEXgpr1NHHA.4376@.TK2MSFTNGP03.phx.gbl...
> They say tempdb requires one data file per CPU. Why ?
> Also, why just tempdb ? Why not every user database to have the same
> requirement of one data file per CPU?
> Thanks
>|||Hi Hassan
To add to Andrews suggestion as well as the KB issue on this I suggest you
also read Kalen Delaney's "Inside Microsoft SQL Server 2005: The Storage
Engine" ISBN 0735621055
John

One data file per CPU.. Why ?

They say tempdb requires one data file per CPU. Why ?
Also, why just tempdb ? Why not every user database to have the same
requirement of one data file per CPU?
ThanksWho is "they say"? If youa re referring to the KBs that MS put out they
actually explain why. But in a nutshell it is because tempdb by nature
creates a lot of new tables and extents where as a user db normally only
creates new objects occasionally. There is contention on the portion of the
file that holds this information when you create lots of new objects
concurrently in SQL2000. Each file has its own allocation unit so you
effectively spread the load across each of the files. But I would read the
articles for more details.
--
Andrew J. Kelly SQL MVP
"Hassan" <Hassan@.hotmail.com> wrote in message
news:OEXgpr1NHHA.4376@.TK2MSFTNGP03.phx.gbl...
> They say tempdb requires one data file per CPU. Why ?
> Also, why just tempdb ? Why not every user database to have the same
> requirement of one data file per CPU?
> Thanks
>|||Hi Hassan
To add to Andrews suggestion as well as the KB issue on this I suggest you
also read Kalen Delaney's "Inside Microsoft SQL Server 2005: The Storage
Engine" ISBN 0735621055
John

Monday, March 26, 2012

on similar tables

hi all,
so i have these tables:
Company
Job
Resume
user searches for a company, views that company. there is a list of
"viewed" companies for that user. Users can attach/delete a (private to
themselves) note about that company.
same for jobs and resumes.
What I want to know is, should i have a CompanyNote, JobNote,
ResumeNote table, or have one Note table?
with the first option, can have a foreign key to the corresponding
Company/Job/Resume table, with the second option cannot.
TIA
Neili suppose i should have one note table:
NOTE
noteid
text
a Company table:
COMPANY
companyid
a User table:
USER
userid
and a COMPANY_USER_NOTE table
COMPANY_USER_NOTE
companyid
userid
noteid
and a JOB_USER_NOTE table:
JOB_USER_NOTE
jobid
userid
noteid
then foreign keys not a problem|||(neilmcguigan@.gmail.com) writes:
> i suppose i should have one note table:
> NOTE
> noteid
> text
> a Company table:
> COMPANY
> companyid
> a User table:
> USER
> userid
> and a COMPANY_USER_NOTE table
> COMPANY_USER_NOTE
> companyid
> userid
> noteid
> and a JOB_USER_NOTE table:
> JOB_USER_NOTE
> jobid
> userid
> noteid
> then foreign keys not a problem
But now you can have multiple notes for the same user to the same item.
And the same note can be connected to both job and company.
But maybe that's a feature?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||would the alternative would be...
table JobNotes:
UserID
JobID
NoteText
and table CompanyNotes:
UserID
CompanyID
NoteText
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97BB794BC5320Yazorman@.127.0.0.1...
> (neilmcguigan@.gmail.com) writes:
> But now you can have multiple notes for the same user to the same item.
> And the same note can be connected to both job and company.
> But maybe that's a feature?
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx

On excel export

We have couple of group in table on one group when we try to export to excel
it supress the data visible to the user.
Suppose i have 10 lines to display it supress 8 lines and show only 2 lines
as the size of it is as such.
What property can we provide to dynamically increase the row height when we
export.On Jun 22, 3:35 am, NAVIN.D <NAV...@.discussions.microsoft.com> wrote:
> We have couple of group in table on one group when we try to export to excel
> it supress the data visible to the user.
> Suppose i have 10 lines to display it supress 8 lines and show only 2 lines
> as the size of it is as such.
> What property can we provide to dynamically increase the row height when we
> export.
It sounds like you are dealing with a merged cells issue in Excel once
the report is exported. The best ways to avoid this is to do the
following:
- Make sure that, if you have multiple tables/controls/matrices above
each other, that they are all touching each other.
- Make sure that the last table/etc control on the report (in Layout
view) is touching the bottom of the report border with no extra space
available.
- Make sure that all controls touch the right-side border of the
report and if you have smaller width controls (in particular
textboxes) in the report, make sure to extend the textbox controls out
to the full width of the report and same width as the widest control
on the report (normally, the table/matrix controls).
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||It didnt slove the issue,
I have list within an list and we have section 1 thru 7. We display the list
based the parameters seleted from report for some result section might start
from 3 thru 6 . In such case when try to export to excel i get huge gaps as i
am missing section 1 thru 2 in the report.
How do we avoid those spaces when exporting to excel,
"EMartinez" wrote:
> On Jun 22, 3:35 am, NAVIN.D <NAV...@.discussions.microsoft.com> wrote:
> > We have couple of group in table on one group when we try to export to excel
> > it supress the data visible to the user.
> >
> > Suppose i have 10 lines to display it supress 8 lines and show only 2 lines
> > as the size of it is as such.
> > What property can we provide to dynamically increase the row height when we
> > export.
>
> It sounds like you are dealing with a merged cells issue in Excel once
> the report is exported. The best ways to avoid this is to do the
> following:
> - Make sure that, if you have multiple tables/controls/matrices above
> each other, that they are all touching each other.
> - Make sure that the last table/etc control on the report (in Layout
> view) is touching the bottom of the report border with no extra space
> available.
> - Make sure that all controls touch the right-side border of the
> report and if you have smaller width controls (in particular
> textboxes) in the report, make sure to extend the textbox controls out
> to the full width of the report and same width as the widest control
> on the report (normally, the table/matrix controls).
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||I am getting the same issue, I have a mixture of TextBoxes and images in the
row and if I take the image cells away the row heights amend themselves
automatically but when the images are in the row they dont resize.
Any ideas? Any Help? Anything?
Anyone
"NAVIN.D" wrote:
> We have couple of group in table on one group when we try to export to excel
> it supress the data visible to the user.
> Suppose i have 10 lines to display it supress 8 lines and show only 2 lines
> as the size of it is as such.
> What property can we provide to dynamically increase the row height when we
> export.|||I am having the same problem on exporting a report containing matrixes, and I
don't know what to try next. This report needs to go into production very
soon.
I inserted a rectangle containing textboxes for column headers in the left
corner of the matrix as instructed. When the matrix is exported to Excel,
there are 2 separate cells where ONE extra pixel, .08in, is inserted between
2 cells, causing a merged cell. There is no apparent reason. I have checked
the alignment and width of the columns and textboxes. I tried it with and
without borders on the textboxes. Nothing is working. When I exported the
matrix after I removed the rectangle and textboxes from the left corner the
export worked correctly. Are there any solutions?

Wednesday, March 21, 2012

OleDbException ErrorCode

When a user finally confirms his order in a shopping cart application (using MS-Access as the backend), the items he has purchased are populated in a Access DB table namedOrders & his personal details (like name, mail, billing address, shipping address etc.) are populated in another table namedCustDetails. Both the DB tables have a column namedOrderID. This column is thePrimary Key in theCustDetails table & theForeign Key in theOrders table. TheSession.SessionID becomes the unique OrderID.

After confirming an order, if the user refreshes the page, the app will try to populate the sameSession.SessionID in theCustDetails table but since the columnOrderID is aPrimary Key column in the tableCustDetails, it won't accept duplicate OrderIDs. Under such circumstances, anOleDbException will be raised.

Since a DB app can throw otherOleDbExceptions other than the one about which I mentioned above, I want to display custom error messages to the user. For e.g. if he refreshes the page after confirming his order, I want to display a message saying "Your order has already been placed".

To do this, I tried using theErrorCode property of theOleDbException class but what I found is theErrorCode changes from time to time! Had a particularErrorCode been assigned to the error, I could have done something like this (assuming that theErrorCode for the above error is-12345 which is constant):

Try
'some code
Catch ex As OleDbException
If (ex.ErrorCode = -12345) Then
Response.Write("Your order has already been placed")
ElseIf (ex.ErrorCode = <some other constant ErrorCode>) Then
Response.Write("Another custom error message")
End If
End Try

But I can't do the above since theErrorCode changes from time to time.

So how do I display custom error messages to users under such circumstances?

Of course, I can use theMessage property of theOleDbException class but that would be a rather tedious workaround.

I would provide user friendly messages for the the common errors in a shared function.

There are too many error codes to redefine them all. Putting the code in a central function allows you to call it from anywhere (excuse my C# but you get the idea)

String ExceptionToFriendlyString(OldDbExcption Ex){switch(Ex.ErrorCode) {case 1234:return"That record has already been inserted";case 5678:return"Friendly error message";default:return Ex.Message; // default to Exception Message }}

|||Thanks for your suggestion, Steve, but as already pointed in post #1 in this thread, the ErrorCode goes on changing. For e.g. when I try to insert a record in a DB table that already exists in that DB table, the ErrorCode turns out to be, say, 1234.

Next I shut down my machine & restart it. Now when I try to insert a record in the same DB table which already exists in the table, then the ErrorCode changes to, say, 5678. Of course, I can use a default message as you have shown in your code but (again) as already pointed out, I want the error messages to be as precise as possible.

Any other suggestions?|||

I think you will find that the reason you are getting different error codes is because you are getting different errors.

|||

Hi RN5A,

I agree that the error code stays fixed when you get certain kind of error. When error code changes, the type of error gets changed.

Tuesday, March 20, 2012

OleDB open connection fails for user DSN

Platform: VC 7.0, Windows 2000
Database: SQL Server 2000
Hi,
I created an API, in-proc server, which uses OLEDB to open connection for a
given DSN.
When I create system dsn and execute API from SQL Server Store procedure it
success.
When I create user dsn and execute API from SQL Server Store procedure it
fails and returns error "Data source name not fond and no default driver
specified".
May I know reason for failing API for user DSN? Is there any solution.
Thanks in advance.
Regards
VijayA user DSN is specific to the user logged in... For this to work you must
create a user DSN for the same user that SQL is using ( since you are doing
this in a sp)... Most people would create a System DSN and not even worry
about it though.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"vijay" <vijaysingh@.abo.abosoftware.com> wrote in message
news:u9puL320DHA.4064@.tk2msftngp13.phx.gbl...
> Platform: VC 7.0, Windows 2000
> Database: SQL Server 2000
>
> Hi,
> I created an API, in-proc server, which uses OLEDB to open connection for
a
> given DSN.
>
> When I create system dsn and execute API from SQL Server Store procedure
it
> success.
>
> When I create user dsn and execute API from SQL Server Store procedure it
> fails and returns error "Data source name not fond and no default driver
> specified".
>
> May I know reason for failing API for user DSN? Is there any solution.
>
> Thanks in advance.
>
> Regards
> Vijay
>
>|||How could I decide which DSN should be crated i.e. either system dsn or user
dsn.
Vijay
Sr. Software Engineer
ABO Software
New Delhi
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:eS7jFH40DHA.2396@.TK2MSFTNGP09.phx.gbl...
> A user DSN is specific to the user logged in... For this to work you must
> create a user DSN for the same user that SQL is using ( since you are
doing
> this in a sp)... Most people would create a System DSN and not even worry
> about it though.
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Computer Education Services Corporation (CESC), Charlotte, NC
> www.computeredservices.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
>
> "vijay" <vijaysingh@.abo.abosoftware.com> wrote in message
> news:u9puL320DHA.4064@.tk2msftngp13.phx.gbl...
> > Platform: VC 7.0, Windows 2000
> >
> > Database: SQL Server 2000
> >
> >
> >
> > Hi,
> >
> > I created an API, in-proc server, which uses OLEDB to open connection
for
> a
> > given DSN.
> >
> >
> >
> > When I create system dsn and execute API from SQL Server Store procedure
> it
> > success.
> >
> >
> >
> > When I create user dsn and execute API from SQL Server Store procedure
it
> > fails and returns error "Data source name not fond and no default driver
> > specified".
> >
> >
> >
> > May I know reason for failing API for user DSN? Is there any solution.
> >
> >
> >
> > Thanks in advance.
> >
> >
> >
> > Regards
> >
> > Vijay
> >
> >
> >
> >
>

Monday, March 19, 2012

OLEDB Datasources and parameters

I have discovered some shortcomings in the way inline table valued function parameters are treated in the OLEDB datasource. You can select the user designed function ine the Generic Query Builder and test it with the required parameters. However when you attempt to set up the parameters for the result ing SQL Command Text you get and error message to the effect that the parameters cannot be retrieved from the datasource. Once again this is disappointing because Report Services seems to deal with the parameters perfectly well.

Dick Campbell

I've never had any problems using parameters in OLEDB Sources. How are you defining the placeholders for your parameters? For OLEDB they should be a single "?".
A sample SQL statement would look like the following:
Select Col1, Col2 from MyTable where MyDate between ? and ?
The first ? would map to Parameter0 and the second would map to Parameter1.
Larry Pope
|||I am using ? as you suggest but I am calling an inline table valued function. The format is "select * from function(?,?,?) as function".

Friday, March 9, 2012

ole db source query assistance requested

my query is below:

"SELECT * FROM " + @.[User:: TableName] +
" WHERE OrderDate = " + "'" + @.[User::dTrxnDate] + "'"

needless to say, the ole db source editor is giving me syntax errors. the data type of TableName is string. the data type of dTrxnDate is DateTime.

can someone please help me resolve the syntax errors?

thanks in advance.

"SELECT Column FROM " + @.[User::TableName] + "
WHERE DateFilterColumn = '" +
(DT_WSTR,4)YEAR(@.[User::DateTimeVar])
+ RIGHT("0" + (DT_WSTR,2)MONTH(@.[User::DateTimeVar]), 2)
+ RIGHT("0" + (DT_WSTR,2)DAY(@.[User::DateTimeVar]), 2)
+ "'"

Expression Date Functions
(http://wiki.sqlis.com/default.aspx/SQLISWiki/ExpressionDateFunctions.html)

Expression Samples
(http://wiki.sqlis.com/default.aspx/SQLISWiki/ExpressionSamples.html)


|||

DarrenSQLIS wrote:

"SELECT Column FROM " + @.[User::TableName] + "
WHERE DateFilterColumn = '" +
(DT_WSTR,4)YEAR(@.[User::DateTimeVar])
+ RIGHT("0" + (DT_WSTR,2)MONTH(@.[User::DateTimeVar]), 2)
+ RIGHT("0" + (DT_WSTR,2)DAY(@.[User::DateTimeVar]), 2)
+ "'"

Expression Date Functions
(http://wiki.sqlis.com/default.aspx/SQLISWiki/ExpressionDateFunctions.html)

Expression Samples
(http://wiki.sqlis.com/default.aspx/SQLISWiki/ExpressionSamples.html)


thanks darren, but i'm still getting a syntax error. my query is below:

"SELECT * FROM " + @.[User::TableName] +
" WHERE OrderDate = '" + (DT_WSTR,4)YEAR(@.[User::dTrxnDate]) + RIGHT("0" + (DT_WSTR,2)MONTH(@.[User::dTrxnDate]), 2) + RIGHT("0" + (DT_WSTR,2)DAY(@.[User::dTrxnDate]), 2) + "'"

below is the syntax error:

TITLE: Microsoft Visual Studio

Error at Load FactOrders Data Flow [Source from xtract [7629]]: An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Statement(s) could not be prepared.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Incorrect syntax near '+'.".


ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0202009 (Microsoft.SqlServer.DTSPipelineWrap)


BUTTONS:

OK|||

That expression works for me, result is -

SELECT * FROM MyTable WHERE OrderDate = '20060915'

Are you sure you have set the full expression in the variable? Have you used the expression builder, which only became available for the variable Expression property with SP1. Previously pasting a multi-line expression into the single line property grid box did not work, you just got the first line.

What does your expression evaluate to in the variable's expression ?

|||

DarrenSQLIS wrote:

That expression works for me, result is -

SELECT * FROM MyTable WHERE OrderDate = '20060915'

Are you sure you have set the full expression in the variable?

i'm evaluating the expression within the ole db source editor. should i evaluate the expression within a variable instead?

my understanding is that the ole db source can evaluate ssis expressions. is this not true?

|||i'm still seeking assistance.|||

Duane Douglas wrote:

i'm still seeking assistance.

Duane,

The Ole DB Source only understands SQL, you cannot use SSIS expression there;tWhat you have to do is to put your expression in a variable(create a variable and then press F4 to get access to the propety pannel) and then in your OLE DB Source component choose Data Access Mode : SQL Command from variable.

Rafael Salas

|||

Rafael Salas wrote:

Duane Douglas wrote:

i'm still seeking assistance.

Duane,

The Ole DB Source only understands SQL, you cannot use SSIS expression there;tWhat you have to do is to put your expression in a variable(create a variable and then press F4 to get access to the propety pannel) and then in your OLE DB Source component choose Data Access Mode : SQL Command from variable.

Rafael Salas

that's what i thought, but i wasn't sure.

thanks.

|||

Rafael Salas wrote:

Duane Douglas wrote:

i'm still seeking assistance.

Duane,

The Ole DB Source only understands SQL, you cannot use SSIS expression there;tWhat you have to do is to put your expression in a variable(create a variable and then press F4 to get access to the propety pannel) and then in your OLE DB Source component choose Data Access Mode : SQL Command from variable.

Rafael Salas

that's what i thought, but i wasn't sure.

thanks.

Monday, February 20, 2012

old question about login, but no help from the existing threads

osql -d adventureworks2000 -U admin -P admin
Login failed for user 'admin'. Reason: Not associated with a trusted SQL
Server connection.
My system and configurations:
- Winxp + sp2
- mssql developer edition + sp3a
- Windows Authentication only
- Local System Account is used to start the sql instance
- admin/admin is the administrator account to login to the xp box
- admin/admin was added to "SQL Server Group/[Machine Name]/Security/Log
ins"
with the database access and all database role assigned to the database in
question.
- admin/admin was added to "Databases/[database in question]/Users, with
Permit in Database Role all checked.
Am I missing anything?
Thanks> - Windows Authentication only
osql -d adventureworks2000 -E
AMB
"man-in-nature" wrote:

> osql -d adventureworks2000 -U admin -P admin
> Login failed for user 'admin'. Reason: Not associated with a trusted SQL
> Server connection.
> My system and configurations:
> - Winxp + sp2
> - mssql developer edition + sp3a
> - Windows Authentication only
> - Local System Account is used to start the sql instance
> - admin/admin is the administrator account to login to the xp box
> - admin/admin was added to "SQL Server Group/[Machine Name]/Security/L
ogins"
> with the database access and all database role assigned to the database in
> question.
> - admin/admin was added to "Databases/[database in question]/Users, wi
th
> Permit in Database Role all checked.
> Am I missing anything?
> Thanks
>

Old problem, but... Cannot open user default database. Login failed. Login failed for user '

I didn't use SQL Express before, now I am trying to use it. I thinkk it is convinient if you just want to copy db files to user's machine. like this

<add name="schsecurity" connectionString="Data Source=.\SQLExpress;Integrated Security=true;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf" />

as long as user has sql express installed, he should be able to use the db once he copy the file aspnetdb.mdf over.

but when I tried it, I got

Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

it looks simple, SQL express can not verify user 'NT AUTHORITY\NETWORK SERVICE'

so I connect SQL express with SQL server management studio, and add the user into login of the SQL express and set the user as sysadmin. But I still get the error.

Any idea?

thanks!

I doubt it has anything to do with copying files to your machine. The default database does not have proper permissions for access. I receive the same message when attempting to log in using username and password. I know the username and password are correct. I'm not sure of how to give the default db permission for access.|||

You should not post like that, it is not helpful.

Can anyone help?

thanks