Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts

Friday, March 23, 2012

How to change from SQL Server Express to Database.mdf connection

Hi,

I've created a SQL Server Express Database that is used by an ASP.NET 2.0 application (developed using VWD Express).

I would like to be able to:

    Make changes to stored procedures, views and table structures while developing/testing ASP.NET application - which, ideally, needs a SQL Server Manager Studio Express connection and Upload my application and data to a database on a network - which, ideally, needs a direct Database.mdf connection.

I know that I need to change my connection string - and am able to achieve that with ease - but I'm not sure what the best way of switching between the two ways of attaching on the database side. I keep getting logon type problems etc.

Thanks very much.

Regards

Gary

Hi,

that should be normally straight forward using on of the user instances string for "attaching" the database to a instance temporarly (www.connectionstrings.com) Which error do you get while attaching ?

HTH, JEns Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 21, 2012

How to change datasource location without having to connect to target database?

I know this is not related directly to Visual Basic, but maybe I can get some helpful feedback here.

We have developed a CR XI report using a local SQL Server database and several tables/views from it. The way we normally change the database a report uses is by going to the Change Datasource Location menu option, creating a new connection to the database and mapping both the main report and each table/view in the report to the new datasource and the new tables/views.

This is what I mean:
http://img411.imageshack.us/img411/9236/crmain8wz.jpg (general report connection properties)
http://img92.imageshack.us/img92/3397/crtable4zp.jpg (specific table/view connection properties)

We now need to distribute this report to the client and need to change the database the report uses. We have the name of the server and database at the client's site, but we obviously have no access to connect to it.

How do we change the datasource location in this case?

Thank you in advance.By the way, I tried using the code in this Microsoft page:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/crystlrf/html/crlrftableclassapplylogoninfomethodtopic.asp

The code is:

Private Sub LogonToReport (ByVal server As String, ByVal database As String, ByVal ID As String, ByVal password As String)
Dim logonInfo As New TableLogOnInfo()
Dim table As Table

' Set the logon information for each table.
For Each table In Report.Database.Tables
' Get the TableLogOnInfo object.
logonInfo = Table.LogOnInfo
' Set the server or ODBC data source name, database name,
' user ID, and password.
logonInfo.ConnectionInfo.ServerName = server
logonInfo.ConnectionInfo.DatabaseName = database
logonInfo.ConnectionInfo.UserID = ID
logonInfo.ConnectionInfo.Password = password
' Apply the connection information to the table.
Table.ApplyLogOnInfo(logonInfo)
Next table
End Sub

(Although I actually used the C# variant, but this is a VB forum.)

The second the ApplyLogOnInfo method is called, the CR component tries to connect to the database. WHY? Is there a way to avoid this?|||I have used this same code and I still have a problem
The connection details are passed using an ini file.
When developing the report (the actual rpt file) we have one database e.g. db1. When the report is copied to the production server we have another database name e.g. db2
The report rpt file holds on to the first name (db1), even though the c# code is showing the database name passed is db2.
Does anyone out there know a way to get the report to use the new database name?sql

How to change data in a crystal report

Hi all,
I have developed a report where i have field called Required. It has a value either 1 or 0 in database. Now I want to display 'Required' if the value is 1 and 'Not Required' if the value is 0. Plz help me to do so...
Thanks in Advance..
PrashanthHi all,
I came to know that this problem can be sorted out by writing a formula. But I dont know how to write a formula. Anybody help me...
IIF (({HY_PDC_PARAMETER_SET_DTL.REQUIRED}= '1'),'Required' ,'NotRequired' )
When I write so its displayin Required for all rows...

Thanks in Advance,
Prashanth.M|||Hi

there's nothing wrong with the formula u have written,
but if the field is numeric type then you don't need the quotes and if it is a bit data type then you need to check the field with true or false.

You can also try the formula in this way :

if {table.Required}=1 then 'Required' else 'Not Required'

Friday, February 24, 2012

how to calculate bandwidth requirement for client-server applicati

I am writing a client-server desktop application.
Front end is developed in VB
Back end database is using SQL 2000
The project is being developed using Classes.
The application will be accessed by 1,000+ users using a Virtual Private
Network to connect to the SQL database.
How to I calculate the Bandwidth requirement per user per transaction for my
application?
Please advise on any tools that can be used to Find out the above
Information? Thanks.
kburito wrote:
> I am writing a client-server desktop application.
> Front end is developed in VB
> Back end database is using SQL 2000
> The project is being developed using Classes.
> The application will be accessed by 1,000+ users using a Virtual
> Private Network to connect to the SQL database.
> How to I calculate the Bandwidth requirement per user per transaction
> for my application?
> Please advise on any tools that can be used to Find out the above
> Information? Thanks.
A call to the database should be pretty small. Use stored procedures (no
server API cursors and the like), make sure result sets are as small as
possible. That means, don't include extraneous columns or unnecessary
rows in the result sets. Also, eliminate all Order By operations on
queries if the application is more than capable of sorting any needed
data itself.
Use read-only, forward-only result sets exclusively and
update/insert/delete data from other stored procedures.
Always fetch all result set data immediately and then process after
everything is fetched.
Never use Parameters.Refresh() type methods from ADO as they require a
lot of interrogation of the database and are slow. Create your
parameters programmatically.
You can use the Show Client Statistics option in Query Analyzer to see
client data for a particular call.
David Gugick
Imceda Software
www.imceda.com