Showing posts with label net. Show all posts
Showing posts with label net. Show all posts

Wednesday, March 28, 2012

problem in deploying the website developed in visual web developer 2005

Hi,

I am new to asp.net.I am trying to deploy the website on IIS created in visual web developer 2005 express.I am having problem with the aspnetdb.mdf for login.
I have copied my entire contents to the physical directory( shared floder),from where the iis virtual directory can access the contents.I can see my login form but when i enter my username and password and click login it gives my error
"error occured in establishing the connection".

I am using the sql server 2005.I don't know what should i do with aspnetdb.mdf?

thanks and urgent help needed

The following article mentions similar issue, you can take a look to see if it solves your problem.

http://forums.asp.net/1257344/ShowPost.aspx

Problem in Dataset

Hi,

dim ds as new MyDataset//This dataset i created while Using ADO.NET Connection
dim dset as new DataSet//This is Standard dataset
ds=SQLHelper.ExecuteDataSet(CommandType.StoredProcedure,"spr_Procedure1")

//There is no error in stored procedure
//Then i tried giving like this

dset=SQLHelper.ExecuteDataSet(CommandType.StoredProcedure,"spr_Procedure1")
ds=CType(dset,MyDataset)

//It shows the following error
System.InvalidCastException: Specified cast is not valid.

Or is there any way i can get the dataset using ADO.NET connection & stored
Procedure,If so plz send me the procedure

Thanx in advancePost your question at ADO.NET or VB.NET section to get much response

problem in crystal reports design

hi,
I want to know if its possible to design crystal reports with checkbox. Iam working in vb.net and using crystal reports.What do you want to to that?

See if you find solution here
http://support.businessobjects.com/

Monday, March 26, 2012

problem in connection with SQLServer using DSN

Hi all,
I am using OdbcConnection for coonectivity with SQL Server db. My code
is working fine with windows application but in ASP.NET or in
webservice its raising following exception -
"ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL
Server does not exist or access denied.
ERROR [01000] [Microsoft][ODBC SQL Server Driver]
[DBNETLIB]ConnectionOpen (Connect())."
at System.Data.Odbc.OdbcConnection.Open()
Same code is working fine for Orace DSN.
My code:
OdbcConnection conn = new
OdbcConnection("dsn=MyDsn;uid=sa;pwd=stars;");
conn.Open();
Please help me to sort out this problem
Thanks
Dharmendra
I expect the reason that no one jumped on this question (which has been
asked and answered a million times) is that you're clearly not following the
advice given here and elsewhere. I suggest you do some reading about getting
connected to SQL Server. The 4th through 6th Editions of my Hitchhiker's
Guide to Visual Basic and SQL Server discuss how to connect via ODBC to SQL
Server. However, they do not talk about the fact that recent versions of SQL
Server require that you enable connectivity before attempting to connect.
This is covered in detail in my latest book and in whitepapers posted on my
blog (see www.betav.com/blogs/billva). And be sure to stop using SA
credentials to handle your customer's data...
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"tomar" <dharmendratomar2000@.gmail.com> wrote in message
news:1179209227.270257.149380@.n59g2000hsh.googlegr oups.com...
> Hi all,
> I am using OdbcConnection for coonectivity with SQL Server db. My code
> is working fine with windows application but in ASP.NET or in
> webservice its raising following exception -
> "ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL
> Server does not exist or access denied.
> ERROR [01000] [Microsoft][ODBC SQL Server Driver]
> [DBNETLIB]ConnectionOpen (Connect())."
> at System.Data.Odbc.OdbcConnection.Open()
> Same code is working fine for Orace DSN.
> My code:
> OdbcConnection conn = new
> OdbcConnection("dsn=MyDsn;uid=sa;pwd=stars;");
> conn.Open();
>
> Please help me to sort out this problem
> Thanks
> Dharmendra
>
|||Thanks for response.
I have tested it dsn through Odbcad32 . It gets connected with sql
server db but when I try to connect via ASP.NET code. It gives error.
Important thing is that
when I load the application with same code on other machine. It works
fine.
Regards
Dharmendra,
================================================== =======
On May 17, 1:20 am, "William \(Bill\) Vaughn"
<billvaRemoveT...@.betav.com> wrote:
> I expect the reason that no one jumped on this question (which has been
> asked and answered a million times) is that you're clearly not following the
> advice given here and elsewhere. I suggest you do some reading about getting
> connected to SQL Server. The 4th through 6th Editions of my Hitchhiker's
> Guide to Visual Basic and SQL Server discuss how to connect via ODBC to SQL
> Server. However, they do not talk about the fact that recent versions of SQL
> Server require that you enable connectivity before attempting to connect.
> This is covered in detail in my latest book and in whitepapers posted on my
> blog (seewww.betav.com/blogs/billva). And be sure to stop using SA
> credentials to handle your customer's data...
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speakerwww.betav.com/blog/billvawww.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> Visitwww.hitchhikerguides.netto get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----X---
> "tomar" <dharmendratomar2...@.gmail.com> wrote in message
> news:1179209227.270257.149380@.n59g2000hsh.googlegr oups.com...
>
>
>
>
>
> - Show quoted text -

problem in connection with SQLServer using DSN

Hi all,
I am using OdbcConnection for coonectivity with SQL Server db. My code
is working fine with windows application but in ASP.NET or in
webservice its raising following exception -
"ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]
SQL
Server does not exist or access denied.
ERROR [01000] [Microsoft][ODBC SQL Server Driver]
[DBNETLIB]ConnectionOpen (Connect())."
at System.Data.Odbc.OdbcConnection.Open()
Same code is working fine for Orace DSN.
My code:
OdbcConnection conn = new
OdbcConnection("dsn=MyDsn;uid=sa;pwd=stars;");
conn.Open();
Please help me to sort out this problem
Thanks
DharmendraI expect the reason that no one jumped on this question (which has been
asked and answered a million times) is that you're clearly not following the
advice given here and elsewhere. I suggest you do some reading about getting
connected to SQL Server. The 4th through 6th Editions of my Hitchhiker's
Guide to Visual Basic and SQL Server discuss how to connect via ODBC to SQL
Server. However, they do not talk about the fact that recent versions of SQL
Server require that you enable connectivity before attempting to connect.
This is covered in detail in my latest book and in whitepapers posted on my
blog (see www.betav.com/blogs/billva). And be sure to stop using SA
credentials to handle your customer's data...
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"tomar" <dharmendratomar2000@.gmail.com> wrote in message
news:1179209227.270257.149380@.n59g2000hsh.googlegroups.com...
> Hi all,
> I am using OdbcConnection for coonectivity with SQL Server db. My code
> is working fine with windows application but in ASP.NET or in
> webservice its raising following exception -
> "ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLI
B]SQL
> Server does not exist or access denied.
> ERROR [01000] [Microsoft][ODBC SQL Server Driver]
> [DBNETLIB]ConnectionOpen (Connect())."
> at System.Data.Odbc.OdbcConnection.Open()
> Same code is working fine for Orace DSN.
> My code:
> OdbcConnection conn = new
> OdbcConnection("dsn=MyDsn;uid=sa;pwd=stars;");
> conn.Open();
>
> Please help me to sort out this problem
> Thanks
> Dharmendra
>|||Thanks for response.
I have tested it dsn through Odbcad32 . It gets connected with sql
server db but when I try to connect via ASP.NET code. It gives error.
Important thing is that
when I load the application with same code on other machine. It works
fine.
Regards
Dharmendra,
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
On May 17, 1:20 am, "William \(Bill\) Vaughn"
<billvaRemoveT...@.betav.com> wrote:
> I expect the reason that no one jumped on this question (which has been
> asked and answered a million times) is that you're clearly not following =
the
> advice given here and elsewhere. I suggest you do some reading about gett=
ing
> connected to SQL Server. The 4th through 6th Editions of my Hitchhiker's
> Guide to Visual Basic and SQL Server discuss how to connect via ODBC to S=
QL
> Server. However, they do not talk about the fact that recent versions of =
SQL
> Server require that you enable connectivity before attempting to connect.
> This is covered in detail in my latest book and in whitepapers posted on =
my
> blog (seewww.betav.com/blogs/billva). And be sure to stop using SA
> credentials to handle your customer's data...
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speakerwww.betav.com/blog/billvawww.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no right=
s=2E
> __________________________________
> Visitwww.hitchhikerguides.netto get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----=
--=AD---
> "tomar" <dharmendratomar2...@.gmail.com> wrote in message
> news:1179209227.270257.149380@.n59g2000hsh.googlegroups.com...
>
>
>
>
>
>
>
>
> - Show quoted text -sql

Problem in connection to sqlexpress witn ASP.nET

hi all

When I use asp.net 2.1 to connect sql 2005 express locally I got error message to say

An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the fact
that under the default settings SQL Server does not allow remote connections.
(provider: SQL Network Interfaces, error: 25 - Connection string is not valid)

I use following connection string

ConnectToDb.ConnectionString = "Data Source=servername;InitialCatalog=PushToMail;Integrated Security=true";

for more information : when I open SQLEXPRESS this oblige me to inter

servername : servername\sqlexpress

authentification: windowsauthentification

and when i try this connection

ConnectToDb.ConnectionString = "Data Source=servername\sqlexpress;InitialCatalog=PushToMail;Integrated

Security=true";

l got this erreur "inorganised sequence space"

next time u install sql 2005 ,use both authentication ,windows and sql.

or try to connect sql using your VS 2005 ,if u have.

|||

Read this thread,

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=327846&SiteID=1

It has answer that explains how to enable remote connections.

Problem in connecting to the SQL Server

i created a dataset in asp.net and i am trying to view the page in the internet explorer and i am getting the following error

Login failed for user 'EASTERN-DFDRY3R\ASPNET'.
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.Data.SqlClient.SqlException: Login failed for user 'EASTERN-DFDRY3R\ASPNET'.

Source Error:

Line 29: {
Line 30: // Put user code to initialize the page here
Line 31: sqlDataAdapter1.Fill(dataSet11);
Line 32: DataGrid1.DataBind();
Line 33: }

Source File: c:\inetpub\wwwroot\key banking system\webform2.aspx.cs Line: 31

Stack Trace:

[SqlException: Login failed for user 'EASTERN-DFDRY3R\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +484
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
Key_Banking_system.WebForm2.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\key banking system\webform2.aspx.cs:31
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

please help me with this....and 'EASTERN-DFDRY3R\ASPNET' is a valid user for the database?|||i dont know understand ur question.|||'EASTERN-DFDRY3R\ASPNET' is the the name of '<MACHINE>\ASPNET' account. Sumas is obviously trying to connect to the DataBase using 'Trusted_Connection=True' in his connection string. To do this, he must add the ASPNET account to the DB user list, and give this account the necessary rights.

Open Enterprise mngr and find your Database, right click and choose 'New Database User'. Locate the 'EASTERN-DFDRY3R\ASPNET' account and add the account. Choose permissions and check 'db_owner'. That should do the trick.|||I'm not sure recommending db_owner is good idea, of course I NEVER do that myself <whistle> ;)

Plus if the server is on a different machine, i.e. not EASTERN_DFDRY3R (natty name by the way), then that local user won't be available. So you'll have to change the IIS/ASPNET user.

Problem in connecting Sql Server to ASP.NET

I installed SQL Server in My P.C using MSDE.
it is acted as local server.
All are working fine (SQL Server and .NET)

when i am trying connect the Sql Server in .net,
i got the Error Message

"Login failed for SA/"

i am trying to Windows authentication mode,
it also gives the error like,

" login failed for Sqlserver name/asp.net"

can any one give the solution for that?

thanks in advance.

regards,
Murugavelyou need to add a user machinename/ASPNET in the users tab under your database sql server enterprise manager.

hth|||am using microsoft biztalk server but i cant see the user tab under my administration? i cant see also the server enterprise manager on my mssql. please help.|||Hi ndinakar ,

i have already created User Account in Enterpriase Manager,It is working fine in SQL SERVER
but still i got the same error message "Login failed" when connecting from ASP.NET

What is the problem?

regds,
Murugavel

Problem in Configuring ASPState DB for .NET 2.0

Hi,

In the current production environment we have web applications running in asp.net 1.1 (win 2003 server) which uses ASPState DB for the session management. We are in the process of migrating few of the web application in asp.net 2.0. We would like to use the same ASPState DB for both 1.1 and 2.0 applications for maintaining the session.

Problem that we are facing: After going through couple of article for configuring the ASPState DB, We ran the InstallPersistSqlState.sql of .net 2.0 framework (log information is given below). Though the sql has updated the existing ASPState DB with the stored procedure corresponding to asp.net 2.0, still we get the following error

Exception: System.Web.HttpException
Message: Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above.

For certain reasons, we are not able to use aspnetreg_sql.exe for setting up the ASPState database. Is there something that I am missing when I run InstallPersistSqlState.sql alone.

Appreciate your help.

Thanks,

Siva

PS: We ran the InstallPersistSqlState.sql in the local sqlserver2000 (residing in winxp) and it works fine.

Result Log:


Run 'aspnet_regsql.exe -?' for details.
--

Completed execution of UninstallPersistSqlState.SQL
Starting execution of InstallPersistSqlState.SQL

--
Note:
This file is included for backward compatibility
only. You should use aspnet_regsql.exe to install
and uninstall SQL session state.
Run 'aspnet_regsql.exe -?' for details.
--
The CREATE DATABASE process is allocating 0.63 MB on disk 'ASPState'.
The CREATE DATABASE process is allocating 0.49 MB on disk 'ASPState_log'.
If the job does not exist, an error from msdb.dbo.sp_delete_job is expected.
Server: Msg 14262, Level 16, State 1, Procedure sp_verify_job_identifiers, Line 61
The specified @.job_name ('ASPState_Job_DeleteExpiredSessions') does not exist.
(1 row(s) affected)
Type added.
(1 row(s) affected)
Type added.
(1 row(s) affected)
Type added.
(1 row(s) affected)
Type added.
(1 row(s) affected)
Type added.
If the category already exists, an error from msdb.dbo.sp_add_category is expected.
Server: Msg 14261, Level 16, State 1, Procedure sp_add_category, Line 32
The specified @.name ('[Uncategorized (Local)]') already exists.
-
Completed execution of InstallPersistSqlState.SQL
-

First of all, this is not the right place for posting a question about the ASP.NET Session DB, this is a CLR in SQLServer related forum only. But from the logs posted the db should have been installed. Make sure that you are trying to connect to the right session database from your web.config file. Also try to monitor if the passwort / username provided are right.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||Dod you solve the problem ?|||

Hi,

I got this problem resolved by running the aspnet_regsql.exe with command line options to setup the ASPState DB.

Anyways, Thanks for the suggestion.

Thanks,

Siva

Friday, March 23, 2012

Problem in calling SQL Server Report through URL

I called a sql server report from asp.net using the following URL

http://phx-ps01/Reports/Pages/Report.aspx?ItemPath=%2fISTEPS_REPORT%2fEQAPCompleteActionsPHX&rs:Parameters=false&rno=" & a &"'

I passed one report parameter whhich is "a".

Report is called correctly, but the problem is parameter is not passed to the report and also parameter bar is visible on the tool bar in the report.

Is there any help that parameter value is passed correctly and parameter option is not displayed on the tool bar of the report.

Hope for the best.

Thanks in advance.

Hello,

To pass paramter to server report use the following code

List<ReportParameter> ReportParamters = new List<ReportParameter>();

ReportParameter paramA = new ReportParameter("a", "test");
ReportParamters.Add(paramA);

rptViewer.ServerReport.SetParameters(ReportParamters);
rptViewer.ServerReport.Refresh();

problem in Adding NewItem(Database.mdf) in Asp.net project

Hi All,

I am new to Asp.net in my application i want to perform some operations with sql server 2005 database, but whenever i am inserting New Item Database.mdf in Myproject(Myproject -> Add NewItem -> Database.mdf ) its displaying the following warning

Failed to generate a user instance of Sql server due to failure in starting the process for the user instance. The connection will be closed

so that i am unable to insert Database.mdf in my project ..

Any help will be greatly appreciated

Thanks,

Vision.

basicl you need to remove "User instance=true " from your connection string .

also you may need to look at similar problem.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=293667&SiteID=1

|||

Solution: Modify the SQL Server (SQLExpress) service to use your local or system account and restart the service. SQLEXPRESS allows a User-Instance process that can connect to a physical MDF database file directly from the connection string. If the User Instance process does not have permissions, it will fail. You can also ATTACH the database file and use a normal connection string, e.g. server=(local);database=DatabaseName;uid=sa;pwd=yourpass

|||

Hi pbromberg,

Can you please suggest how to modify the Sql Server service to use system account. And also i don't want to connect to a physical MDF database file directly from the connection string.(just i want to add new item datasoure.mdf)

waiting for u r suggestion..

Thanks,

Vision.v1

Wednesday, March 21, 2012

Problem getting DTS object to work on a Web form

Hi;

I would like to run a DTS package from the On click button event on a web form.

I tried using code that works in a windows form.

But ASP.net, VS 2005 doesn't like the code.

Here are the libraries that I used with the windows form.

Imports System,Imports System.Data.Imports System.Data.SqlClient.

Is there a library that I am missing ?

And here are the lines of code that won't compile:

Dim oPackageAsNew DTS.Package2Class

Dim oStepAs DTS.Step

Package.LoadFromSQLServer("123WXYZ\TRSQL", , , DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection, , , ,"cpyPrinters2Excel", )

I am able to run the above in a windows form with no problem.

Thanks for any insights,

Gordon

Hi GMann,

The Imports statement only imports namespaces. It is not add reference to a certain library.

Since you're running DTS packages, you will need to reference the Microsoft DTSPackage Object (COM) Library(DTS.DLL). Use add reference from the Project menu.

HTH. If this does not answer you question, please feel free to mark it as Not Answered and post your reply. Thanks!

|||

These KB articles will be helpful

http://support.microsoft.com/kb/321525/en-us

http://support.microsoft.com/kb/242391/en-us

problem formatting date

Hi all,
I make an insert of date with VB.Net using the "format" function:
format(Now(), "dd/MM/yyyy hh:mm:ss").
In my dev environment it work fine.
But when I put the page on production server
the format fuction change the tima formatting, change ":" with "."
so it pass hh.mm.ss to the DB crashing the insert.
I used a replace function to restore ":", and it work fine.
Bue any idea?
Why this happen
thanks allThis is a pure VB.NET question, so you probably have better luck asking this
in a VB.NET forum.
However, I strongly encourage you to format the datetime as 'YYYYMMDD hh:mm:
ss'. Check
http://www.karaszi.com/SQLServer/info_datetime.asp for the reason.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Henry Cabot Enaus III" <hceiii@.yahoo.com> wrote in message
news:512ff012.0409010324.126ebd78@.posting.google.com...
> Hi all,
> I make an insert of date with VB.Net using the "format" function:
> format(Now(), "dd/MM/yyyy hh:mm:ss").
> In my dev environment it work fine.
> But when I put the page on production server
> the format fuction change the tima formatting, change ":" with "."
> so it pass hh.mm.ss to the DB crashing the insert.
> I used a replace function to restore ":", and it work fine.
> Bue any idea?
> Why this happen
> thanks all

problem formatting date

Hi all,
I make an insert of date with VB.Net using the "format" function:
format(Now(), "dd/MM/yyyy hh:mm:ss").
In my dev environment it work fine.
But when I put the page on production server
the format fuction change the tima formatting, change ":" with "."
so it pass hh.mm.ss to the DB crashing the insert.
I used a replace function to restore ":", and it work fine.
Bue any idea?
Why this happen
thanks all
This is a pure VB.NET question, so you probably have better luck asking this in a VB.NET forum.
However, I strongly encourage you to format the datetime as 'YYYYMMDD hh:mm:ss'. Check
http://www.karaszi.com/SQLServer/info_datetime.asp for the reason.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Henry Cabot Enaus III" <hceiii@.yahoo.com> wrote in message
news:512ff012.0409010324.126ebd78@.posting.google.c om...
> Hi all,
> I make an insert of date with VB.Net using the "format" function:
> format(Now(), "dd/MM/yyyy hh:mm:ss").
> In my dev environment it work fine.
> But when I put the page on production server
> the format fuction change the tima formatting, change ":" with "."
> so it pass hh.mm.ss to the DB crashing the insert.
> I used a replace function to restore ":", and it work fine.
> Bue any idea?
> Why this happen
> thanks all
sql

problem formatting date

Hi all,
I make an insert of date with VB.Net using the "format" function:
format(Now(), "dd/MM/yyyy hh:mm:ss").
In my dev environment it work fine.
But when I put the page on production server
the format fuction change the tima formatting, change ":" with "."
so it pass hh.mm.ss to the DB crashing the insert.
I used a replace function to restore ":", and it work fine.
Bue any idea?
Why this happen
thanks allThis is a pure VB.NET question, so you probably have better luck asking this in a VB.NET forum.
However, I strongly encourage you to format the datetime as 'YYYYMMDD hh:mm:ss'. Check
http://www.karaszi.com/SQLServer/info_datetime.asp for the reason.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Henry Cabot Enaus III" <hceiii@.yahoo.com> wrote in message
news:512ff012.0409010324.126ebd78@.posting.google.com...
> Hi all,
> I make an insert of date with VB.Net using the "format" function:
> format(Now(), "dd/MM/yyyy hh:mm:ss").
> In my dev environment it work fine.
> But when I put the page on production server
> the format fuction change the tima formatting, change ":" with "."
> so it pass hh.mm.ss to the DB crashing the insert.
> I used a replace function to restore ":", and it work fine.
> Bue any idea?
> Why this happen
> thanks all

Tuesday, March 20, 2012

Problem Export - Works on dev computer, not on other ones...

I have a problem exporting report with Crystal Report for Visual Studio .NET 2002.
In fact, with the computer I used to program, the export works fine. I've tried to get my .NET project on another computer, and there the export doesn't work...
The error occurs on the line : report.Export(); When I catch it, it says "Echec de connexion", which means "Connection failed".

Here are my config :

- The "good" computer : Win 2000 Server with last SP's, VS.NET 2002, Crystal Report for VS .NET

- The "bad" one : same one...

I also tried on an Xp computer, and it doesn't work either...

I've tried the Modules utility from Business Object to see if DLL's were missing on "bad" computer, but it's quite hard to define ('have to see the DLL under aspnet_wp.exe process, haven't I ?)

I install all services packs and hotfixes for Crystal Report for VS .NET 2002...It doesn't change anything.

So, if you have any idea, it would be welcomed !! Thanks.Check to make sure all the required Export dlls are installed on the "bad" computer.

Each Export format (Excel, pdf, etc) and each Export Destination (Aplication, Disk, etc) has to have a dll installed on the machine it's running on. If, for example, you can export to pdf, but not to Excel, your problem may be that the dll required for Excel Export is missing.

In Crystal Reports 8.5, there's a file called runtime.hlp that tells exactly what dlls are required depending on what your application uses.

(Ex. For CR 8.5 and Win2k, my Excel export dll is: C:\WINNT\Crystal\u2fxls.dll and my dll for Exporting to Application is: C:\WINNT\Crystal\u2dapp.dll)

Monday, March 12, 2012

Problem encountered during the installation of Visual Studio .NET 2005 Professional on a windows

Hi ALL,

I'd tried to install Visual Studio .NET 2005 Professional Edition on a Windows 2000 domain PC, and everything was fine except the last step (i.e. installing SQL Express). I got the error message "Microsoft SQL Server 2005 Express Edition x86: [2] Component Microsoft SQL Server 2005 Express Edition x86 returned an unexpected value. ***EndOfSession***". Further investigation on the error in "C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG" and found that "Product : SQL Server Database Services Error : SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft][SQL Native Client][SQL Server]Cannot alter the login 'sa', because it does not exist or you do not have permission.. Refer to the server error logs and Setup logs for detailed error information." I used a domain account with local administrator privilege to install. I doubt whether my domain policy affect the installation. Could someone tell me what security policy I should set to allow the installation of the Visual Studio .NET 2005 Professional on a domain PC.

TIA.

M Chan

Try the workaround here:

http://blogs.msdn.com/quanto/archive/2005/12/16/504693.aspx

|||

We'd tried (Put the domain account into the local Users group as well) but still failed. As a domain account, how can we list it first in the local administrators group? PS. The domain account is already belonging to the local administrators group.

TIA.

M Chan

|||

Moving thread to SQL setup forum.

|||

Hi ALL,

The domain PC is Windows XP Prof. with SP2 _ latest patches installed. The installation is run by a domain account which has local administrator privilege on the domain PC.

M Chan

|||Did you ever get this resolved. I'm having the same issue.|||Not yet. I just wonder why the setup cannot be done if the Windows XP Prof. SP2 had joined to the domain with McAfee v8.0 installed. The problem should be related to some security settings.|||

I looked through our bugs and came up with something.

Looks like if SQL Server 2005 RTM is installed in a Domain where a windows Group named 'sa', 'SA', 'Sa' or 'sA' exists, installation fails when Integrated Security is chosen. However, despite having the Windows group in the Domain, installation with Mixed Security work fine. After having installed successfully with Mixed Secuirty, the server properties can be changed to accept Integrated Security connections only. This should work.

Hope this helps.

-Jeffrey

|||

Do you know if there are installation options in the Visual Studio .NET 2005 to specify the security mode for SQL Server 2005 RTM. If no, we need to separate out the SQL 2005 Express Edition from the Visual Studio .NET 2005 and install the SQL 2005 Express Edition individually.

TIA.

M Chan

|||No, there isn't an instgall option to specify the security mode separately. You should know, though, that with integrated security, the SA account is disabled.

Problem encountered during the installation of Visual Studio .NET 2005 Professional on a windows

Hi ALL,

I'd tried to install Visual Studio .NET 2005 Professional Edition on a Windows 2000 domain PC, and everything was fine except the last step (i.e. installing SQL Express). I got the error message "Microsoft SQL Server 2005 Express Edition x86: [2] Component Microsoft SQL Server 2005 Express Edition x86 returned an unexpected value. ***EndOfSession***". Further investigation on the error in "C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG" and found that "Product : SQL Server Database Services Error : SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft][SQL Native Client][SQL Server]Cannot alter the login 'sa', because it does not exist or you do not have permission.. Refer to the server error logs and Setup logs for detailed error information." I used a domain account with local administrator privilege to install. I doubt whether my domain policy affect the installation. Could someone tell me what security policy I should set to allow the installation of the Visual Studio .NET 2005 Professional on a domain PC.

TIA.

M Chan

Try the workaround here:

http://blogs.msdn.com/quanto/archive/2005/12/16/504693.aspx

|||

We'd tried (Put the domain account into the local Users group as well) but still failed. As a domain account, how can we list it first in the local administrators group? PS. The domain account is already belonging to the local administrators group.

TIA.

M Chan

|||

Moving thread to SQL setup forum.

|||

Hi ALL,

The domain PC is Windows XP Prof. with SP2 _ latest patches installed. The installation is run by a domain account which has local administrator privilege on the domain PC.

M Chan

|||Did you ever get this resolved. I'm having the same issue.
|||Not yet. I just wonder why the setup cannot be done if the Windows XP Prof. SP2 had joined to the domain with McAfee v8.0 installed. The problem should be related to some security settings.|||

I looked through our bugs and came up with something.

Looks like if SQL Server 2005 RTM is installed in a Domain where a windows Group named 'sa', 'SA', 'Sa' or 'sA' exists, installation fails when Integrated Security is chosen. However, despite having the Windows group in the Domain, installation with Mixed Security work fine. After having installed successfully with Mixed Secuirty, the server properties can be changed to accept Integrated Security connections only. This should work.

Hope this helps.

-Jeffrey

|||

Do you know if there are installation options in the Visual Studio .NET 2005 to specify the security mode for SQL Server 2005 RTM. If no, we need to separate out the SQL 2005 Express Edition from the Visual Studio .NET 2005 and install the SQL 2005 Express Edition individually.

TIA.

M Chan

|||No, there isn't an instgall option to specify the security mode separately. You should know, though, that with integrated security, the SA account is disabled.

Problem encountered during the installation of Visual Studio .NET 2005 Professional on a windows

Hi ALL,

I'd tried to install Visual Studio .NET 2005 Professional Edition on a Windows 2000 domain PC, and everything was fine except the last step (i.e. installing SQL Express). I got the error message "Microsoft SQL Server 2005 Express Edition x86: [2] Component Microsoft SQL Server 2005 Express Edition x86 returned an unexpected value. ***EndOfSession***". Further investigation on the error in "C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG" and found that "Product : SQL Server Database Services Error : SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft][SQL Native Client][SQL Server]Cannot alter the login 'sa', because it does not exist or you do not have permission.. Refer to the server error logs and Setup logs for detailed error information." I used a domain account with local administrator privilege to install. I doubt whether my domain policy affect the installation. Could someone tell me what security policy I should set to allow the installation of the Visual Studio .NET 2005 Professional on a domain PC.

TIA.

M Chan

Try the workaround here:

http://blogs.msdn.com/quanto/archive/2005/12/16/504693.aspx

|||

We'd tried (Put the domain account into the local Users group as well) but still failed. As a domain account, how can we list it first in the local administrators group? PS. The domain account is already belonging to the local administrators group.

TIA.

M Chan

|||

Moving thread to SQL setup forum.

|||

Hi ALL,

The domain PC is Windows XP Prof. with SP2 _ latest patches installed. The installation is run by a domain account which has local administrator privilege on the domain PC.

M Chan

|||Did you ever get this resolved. I'm having the same issue.
|||Not yet. I just wonder why the setup cannot be done if the Windows XP Prof. SP2 had joined to the domain with McAfee v8.0 installed. The problem should be related to some security settings.|||

I looked through our bugs and came up with something.

Looks like if SQL Server 2005 RTM is installed in a Domain where a windows Group named 'sa', 'SA', 'Sa' or 'sA' exists, installation fails when Integrated Security is chosen. However, despite having the Windows group in the Domain, installation with Mixed Security work fine. After having installed successfully with Mixed Secuirty, the server properties can be changed to accept Integrated Security connections only. This should work.

Hope this helps.

-Jeffrey

|||

Do you know if there are installation options in the Visual Studio .NET 2005 to specify the security mode for SQL Server 2005 RTM. If no, we need to separate out the SQL 2005 Express Edition from the Visual Studio .NET 2005 and install the SQL 2005 Express Edition individually.

TIA.

M Chan

|||No, there isn't an instgall option to specify the security mode separately. You should know, though, that with integrated security, the SA account is disabled.

Problem designing Chart

I am trying to create a bar chart that looks like this:

http://www.webfound.net/chart3.jpg (sketch from a user).

ignore the first set of bars in the above, I'm just trying to create the rest for AZ and IL..the other 2 sets of bars in my chart in SSRS 2005

I have created a dataset that runs a stored proc and resturns the following values:

http://www.webfound.net/values1.jpg

My bar chart looks like this in layout mode:

http://www.webfound.net/chart_layout.jpg

And my results do not look like what I want:

http://www.webfound.net/chart_results.jpg

Questions

1) Why is it not giving me just 3 bars for IL and 3 bars for AZ based on the series groups GrossGoal, InHouse2, and ProjFee? It's instead just showing one bar for all 3 fields - as seen in the legend

I should be getting 3 columns per category...see below

http://msdn2.microsoft.com/en-us/library/ms160349.aspx

"Series groups are optional. The series group list is used to provide dynamic groups of data in the chart. For example, in a column chart, data from the categories list will result in a column for each series group, in each category."

http://msdn2.microsoft.com/en-us/library/ms155847.aspx

2) How can I get this to work for both IL and AZ? this is more complicated than originally thought

Was able to resolve this with the help of Jon http://weblogs.sqlteam.com/jhermiz/category/197.aspx

I had to do 2 things to get this to work:

1) do not use any fields in series

2) add GrossGoal, InHouse, and ProjFee fields into the Data section of the bar chart

3) Add the Category field that contains the group names (which I was already doing)