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

Monday, March 26, 2012

How can I process my cube from a windows form?

I prefer c#.net but if you only know VB.net that would be helpful. Even if you know how to do it from a command prompt, that would be very helpful. I am using SSAS2005.

This is the xmla file that it generates when I go to script the command, I dont know if this helps.


Code Snippet

<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
'>http://schemas.microsoft.com/analysisservices/2003/engine">http://schemas.microsoft.com/analysisservices/2003/engine">
; <Process xmlns:xsd="http://www.w3.org/2001/XMLSchemahttp://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</A< A>>" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instancehttp://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</A< A>>" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2http://schemas.microsoft.com/analysisservices/2003/engine/2">http://schemas.microsoft.com/analysisservices/2003/engine/2</A< A>>" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2">
'>http://schemas.microsoft.com/analysisservices/2003/engine/2/2">http://schemas.microsoft.com/analysisservices/2003/engine/2/2">
; <Object>
<DatabaseID>MRSTATSanalysis</DatabaseID>
<CubeID>MRSTATS</CubeID>
</Object>
<Type>ProcessFull</Type>
<WriteBackTableCreation>UseExisting</WriteBackTableCreation>
</Process>
</Batch>

Thank you all.

I found this code in a different thread, but it should work here. This code reads the xmla from a file.

Code Snippet

using System.IO;
using Microsoft.AnalysisServices.AdomdClient;

public class XmlaExecutor
{
public static void Main(string[] args)
{
TextReader tr = File.OpenText(args[0]);
string xmla = tr.ReadToEnd();
tr.Close();
AdomdConnection cn = new AdomdConnection("Data Source=localhost");
cn.Open();
AdomdCommand cmd = cn.CreateCommand();
cmd.CommandText = xmla;
cmd.ExecuteNonQuery();
cn.Close();
}
}

|||Thanks a lot, that worked perfectly. The only thing I had to do was add the .NET reference to Microsoft.AnalysisServices.AdomdClient.|||

You can also use AMO (Microsoft.AnalysisServices.dll), the management object model for Analysis Services 2005. ADOMD.NET (Microsoft.AnalysisServices.AdomdClient.dll) is mostly for querying data, while AMO is for management tasks like process, backup, restore, create, delete objects.

Quick info on AMO: http://adriandu.spaces.live.com/

Sample AMO code to create and process a partition: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=516918&SiteID=1

Adrian Dumitrascu

Friday, March 23, 2012

How can i populate sql server db with data in french ??

I'm trying to do it , but i see only ''' symbols instead my data in french.
When i retrieve it in .NET application i have ''' symbols in datagrid too.
Please help me, thanksare you using unicode data types to store your textual data? IE: nvarchar,
nchar, ntext
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Database change management for SQL Server
"Oxana" wrote:

> I'm trying to do it , but i see only ''' symbols instead my data in frenc
h.
> When i retrieve it in .NET application i have ''' symbols in datagrid too
.
> Please help me, thanks

How can I pass a parameter value from VB.Net to Crystal Report?

Hi! I need your help...asap...

How can I pass a parameter value from VB.Net to Crystal Report 11?

I created a report from Crystal Report 11 which has a parameter field for querying the records and I created a form from VB.Net which allows the user to enter a value which will be used for the report but I don't how to pass a parameter value from VB.Net to Crystal Report.Try This...

dim Report as New ReportDocument

Report.Load("YourReport.rpt") 'This is your Crystal Report File

Report.SetParameterValues("PARAM1","Christine") 'PARAM1 should have exactly the same spelling as what can be found in your parameter list in your "*.rpt" file.

CRViewer.Reportsource = Report

How can i onnect Visual Basic Express 2005 to a remote SQL Server Express 2005?

Hi

Im trying to connect Visual Basic Express 2005 to a remote SQL Server Express 2005. I cant find how i can do that in VB.net Express.
In Web developer there are no problem to connect to a remote SQL server but i cant find it in VB.net Express.

The XP with the SQL server that i want to connect to is on the local network.

Greatful for help!

You may check this link:

http://msdn.microsoft.com/vstudio/express/vb/features/data/

If you need a admin tool for the SQL Express databases, you can dowload Management Studio Express from here:

http://msdn.microsoft.com/vstudio/express/sql/download/default.aspx

sql

Wednesday, March 21, 2012

How Can i Now the RecordSource number of records?

Hi...

I just begining to use the asp.net 2.0 and have tow littel problems... in my project the user makes a "list of problems on a house" when hi post the house number the page shoud to generete a master recod with a keynumber, the date an hour and the state of problems... and a form to insert a list of problems... but if the house dosn′t exist this forms are hidden... then i need to know the nomber of records that gets a recordsource if its more than cero show the forms else hiden it... if show the forms i need to store in a variable the keynumber to store it in the problem details table... ?How i can khow the number of records of a RecordSource gets?... and ?How I can store in a variable a field value retrived for a RecordSource?... I′m using VWD and SQL Express that means ADO.NET 2.0...

cheers.

How are you binding to your datasource? A SqlDataSource, ObjectDataSource, or are you binding to the datasource in your code using a DataTable, DataReader, or DataSet?

How can i merge ASPNEDB.mdb with my Database

can anyone explain me in detail abt web.cofig and machine.config with an easy and suitable example , also i wana know that as u know that asp.net 2.0 provides a builtin ASPNETDB but it contain limited and general entities for any real time application i have other entites for that i have to make another Database so i hav 2 databases for any application but i want to use only 1 DB ,my question is i want to merge aspnetdb.mdb with my new database do u know how can i merge it ?? but the functionality of ASPNETDB.mdb remain same

If your new database is SQL Server, then you can simply run the ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe) on your new database.

http://msdn2.microsoft.com/en-us/library/ms229862(VS.80).aspx

how can i mapped the sql data to the ms access db?

I need to create an ASP.Net page that connects to an MS SQL server as its
dbase. But the MS SQL server is really connecting to an MS Access db to get
the data.How can I mapped the data of the ms access db so that when my ms
sql server connects it can get the data and display the data in my ASP.net
page.
thanksHi
Is there a linked server created to communicate with Access database?
Please refer to the BOL (Linked servers) .
"cEciLlE" <cecille.regidor@.gmail.com> wrote in message
news:%23c8TSgiEFHA.3824@.TK2MSFTNGP10.phx.gbl...
> I need to create an ASP.Net page that connects to an MS SQL server as its
> dbase. But the MS SQL server is really connecting to an MS Access db to
get
> the data.How can I mapped the data of the ms access db so that when my ms
> sql server connects it can get the data and display the data in my ASP.net
> page.
> thanks
>

Monday, March 19, 2012

How can I make reports and hide columns at runtime?

Hello. I did a report that has many many columns. I should give the user the
possibility to choose which columns to use with my asp.net program. Is that
possible to do? The only columns that must be shows are the ones that the
user has choosed.
Is that possible. ! !Please help me with links, code, books anythin
neccesary.Luis,
This is possible, simply create a boolean parameter for each column you want
to show/hide (e.g. ShowOfficeName) then select the column in the datagrid
and set the visibility | Hidden property to an expression of
= Not Parameters!ShowOfficeName.Value
Hope this helps,
Brian
"Luis Esteban Valencia" <levalencia@.avansoft.com> wrote in message
news:OLwPSwAeFHA.3352@.TK2MSFTNGP09.phx.gbl...
> Hello. I did a report that has many many columns. I should give the user
> the
> possibility to choose which columns to use with my asp.net program. Is
> that
> possible to do? The only columns that must be shows are the ones that the
> user has choosed.
> Is that possible. ! !Please help me with links, code, books anythin
> neccesary.
>

How can I make reports and hide columns at run time with my aspnet app?

Hello. I did a report that has many many columns. I should give the user the
possibility to choose which columns to use with my asp.net program. Is that
possible to do? The only columns that must be shows are the ones that the
user has choosed.

Is that possible. ! !Please help me with links, code, books anythin
neccesary.You can parameterize the report and set the visibilty property on the column to be dependent on the parameter value. If you want to hide mlutiple columns, you will need multiple parmeters or, in SQL 2005, you can have a multivalued parameted. The only downside to this approach is that the body will not shrink with the hidden columns. This can cause problems when printing / exporting the report.

Monday, March 12, 2012

how can I know the proces in SP is finished ?

i am using vb.net , the prgoram will called a big SP to insert the data and
the output them into a excel file.
How can I know the SP 's process is finished ?
Does SP need to return something to my vb.net ?
if yes, How can I write it ?
Please helpAgnes
> Does SP need to return something to my vb.net ?
It is up to you , to develop some logic within a stored procedure like
RAISERROR or RETURN command
What do you worry about? Does the SP hang up?
"Agnes" <agnes@.dynamictech.com.hk> wrote in message
news:%233E%23bc8hGHA.4080@.TK2MSFTNGP03.phx.gbl...
>i am using vb.net , the prgoram will called a big SP to insert the data and
>the output them into a excel file.
> How can I know the SP 's process is finished ?
> Does SP need to return something to my vb.net ?
> if yes, How can I write it ?
> Please help
>|||> How can I know the SP 's process is finished ?
The command will not return back to your program until the procedure
finishes. You may need to override the default CommandTimeout if you expect
the proc to run more than 30 seconds.

> Does SP need to return something to my vb.net ?
There is no requirement to return anything from the stored procedure. You
can trap errors via a try/catch block in your code.
Hope this helps.
Dan Guzman
SQL Server MVP
"Agnes" <agnes@.dynamictech.com.hk> wrote in message
news:%233E%23bc8hGHA.4080@.TK2MSFTNGP03.phx.gbl...
>i am using vb.net , the prgoram will called a big SP to insert the data and
>the output them into a excel file.
> How can I know the SP 's process is finished ?
> Does SP need to return something to my vb.net ?
> if yes, How can I write it ?
> Please help
>|||My program aim is [User click a button to print the account report]
(1)User click preview button ->> show one dialog progress bar form
(2)That form will create a thread ->> thread exexcute 10 sql command to
calculate the data and insert into one temp table (I will use SP to run the
insert statment)
(3) After finish, progress bar form closed, report will be preview.
Now my problem is "the report show a blank records" , It seems ,
sql command can't be completed in the thread. Or the report show before the
SP is completed. How can I know the execution in SP completed ?
"Uri Dimant" <urid@.iscar.co.il> glsD:O70EcT9hGHA.4776@.TK2MSFTNGP05.phx.gbl...[vbco
l=seagreen]
> Agnes
> It is up to you , to develop some logic within a stored procedure like
> RAISERROR or RETURN command
> What do you worry about? Does the SP hang up?
>
>
> "Agnes" <agnes@.dynamictech.com.hk> wrote in message
> news:%233E%23bc8hGHA.4080@.TK2MSFTNGP03.phx.gbl...
>[/vbcol]

how can I know the proces in SP is finished ?

i am using vb.net , the prgoram will called a big SP to insert the data and
the output them into a excel file.
How can I know the SP 's process is finished ?
Does SP need to return something to my vb.net ?
if yes, How can I write it ?
Please helpAgnes
> Does SP need to return something to my vb.net ?
It is up to you , to develop some logic within a stored procedure like
RAISERROR or RETURN command
What do you worry about? Does the SP hang up?
"Agnes" <agnes@.dynamictech.com.hk> wrote in message
news:%233E%23bc8hGHA.4080@.TK2MSFTNGP03.phx.gbl...
>i am using vb.net , the prgoram will called a big SP to insert the data and
>the output them into a excel file.
> How can I know the SP 's process is finished ?
> Does SP need to return something to my vb.net ?
> if yes, How can I write it ?
> Please help
>|||> How can I know the SP 's process is finished ?
The command will not return back to your program until the procedure
finishes. You may need to override the default CommandTimeout if you expect
the proc to run more than 30 seconds.
> Does SP need to return something to my vb.net ?
There is no requirement to return anything from the stored procedure. You
can trap errors via a try/catch block in your code.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Agnes" <agnes@.dynamictech.com.hk> wrote in message
news:%233E%23bc8hGHA.4080@.TK2MSFTNGP03.phx.gbl...
>i am using vb.net , the prgoram will called a big SP to insert the data and
>the output them into a excel file.
> How can I know the SP 's process is finished ?
> Does SP need to return something to my vb.net ?
> if yes, How can I write it ?
> Please help
>|||My program aim is [User click a button to print the account report]
(1)User click preview button ->> show one dialog progress bar form
(2)That form will create a thread ->> thread exexcute 10 sql command to
calculate the data and insert into one temp table (I will use SP to run the
insert statment)
(3) After finish, progress bar form closed, report will be preview.
Now my problem is "the report show a blank records" , It seems ,
sql command can't be completed in the thread. Or the report show before the
SP is completed. How can I know the execution in SP completed ?
"Uri Dimant" <urid@.iscar.co.il> ¼¶¼g©ó¶l¥ó·s»D:O70EcT9hGHA.4776@.TK2MSFTNGP05.phx.gbl...
> Agnes
>> Does SP need to return something to my vb.net ?
> It is up to you , to develop some logic within a stored procedure like
> RAISERROR or RETURN command
> What do you worry about? Does the SP hang up?
>
>
> "Agnes" <agnes@.dynamictech.com.hk> wrote in message
> news:%233E%23bc8hGHA.4080@.TK2MSFTNGP03.phx.gbl...
>>i am using vb.net , the prgoram will called a big SP to insert the data
>>and the output them into a excel file.
>> How can I know the SP 's process is finished ?
>> Does SP need to return something to my vb.net ?
>> if yes, How can I write it ?
>> Please help
>

How can I kill sleeping processes in SQL Server?

Dear,

Our ASP.NET scripts send SQL statements (as inline SQL or SP) to process the requested job. After the job execution, the process ID stays in the server and waits for next command with sleeping status.Since this process does not go away, next job adds another process and eventually, the server is overloaded with these processes and dies.

How can I kill this sleeping processes?

Regards,

Echo

Off the top of my head if you
EXECsp_who
it will give you the SPID's for all your processes. Armed with that you could then issue  
KILL 42
which will terminate SPID 42
So I would guess that you could set up a job in SQL Server to get a list of all offending SPID's, schedule it to run every hour for arguments sake, and then step through that list issuing the KILL command.
HTH|||

Please do take care when using KILL to kill SQL sessions.SPID<=50 are SQL system processes, so you'd better not kill such processes. Always confirm that the session is no longer useful (has been idle for a long time or invovled in blocking/deadlock) before you KILL it. For more information about the KILL command in T-SQL, you can refer to:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_kf-kz_1zos.asp

|||

Iori_Jay:

Please do take care when using KILL to kill SQL sessions

I very much agree with Iori_Jay, and really should have advised caution in my earlier post.

|||

For example, you can use such query to Kill SQL sessions which are sleeping and have been idle more than 1 hour:

DECLARE @.v_spid INT
DECLARE c_Users CURSOR
FAST_FORWARD FOR
SELECT SPID
FROM master..sysprocesses (NOLOCK)
WHERE spid>50
AND status='sleeping'
AND DATEDIFF(mi,last_batch,GETDATE())>=60
AND spid<>@.@.spid

OPEN c_Users
FETCH NEXT FROM c_Users INTO @.v_spid
WHILE (@.@.FETCH_STATUS=0)
BEGIN
PRINT 'KILLing '+CONVERT(VARCHAR,@.v_spid)+'...'
EXEC('KILL'+@.v_spid)
FETCH NEXT FROM c_Users INTO @.v_spid
END

CLOSE c_Users
DEALLOCATE c_Users

|||

Dear all,

Thank U everybody for replying. But I do not want to run any process at SQL server. Can't I manage it from ADO.NET. Is it possible that after executing a process it will automatically die.

I think the problem may related to connection pooling. Can I stop connection pooling of ADO.NET programatically?

Regards,

Sultan

|||

Why do you want to stop connection pooling...Connection Pooling can improve performance for database connections. If you just want to prevent unexpected remaining connecitons, you can just set the connection timeout when you create the connection in your code.

You can also take a look at this article:

Tuning Up ADO.NET Connection Pooling in ASP.NET Applications

How can I install Report Server without VS.NET?

VS.NET 2003 is required for the installation of the reporting services.
Question is how can I install the Reporting Server on a staging or
production box?
Thanks,
-StanVS.NET 2003 is ONLY required only for the report design components.
In your case, it sounds like you're only interested in installing the Report
Manager and RS Web Services, so you can install without VS.NET 2003. That
message you see when you go to install is only a warning that you will not
be able to use the design components without VS.NET 2003.
Best Regards,
Benjamin Pierce
"Stan" <nospam@.yahoo.com> wrote in message
news:OPmYMsmbEHA.4092@.TK2MSFTNGP11.phx.gbl...
> VS.NET 2003 is required for the installation of the reporting services.
> Question is how can I install the Reporting Server on a staging or
> production box?
> Thanks,
> -Stan
>

Friday, March 9, 2012

How can I insert Date in SQL Server 2000 database (table )from ASP.NET 1.1. Program?

hi ALL !!!

How can I insert Date in SQL Server 2000 database(table ) from ASP.NET 1.1. Program??

pls sendme codeif u can

pls help me ..

Well w/out seeing how you've been trying to insert it--you just take whatever control your taking a date from and do CDate(txtbox1.text) --if this doesn't help, lets see some of your code|||

You could usehttp://www.sqldatalayer.com to create your DataLayer.

I am the author of the above mentioned tool, and I'm currently working on the help documentation.

I plan on having fully functionaly example apps, in the help as well.

Monday, February 27, 2012

How can I get the SQL Server 2000 Column Description

How can I get the SQL Server 2000 Column Description within ADO.NET 2.0?

BR / Chris

Hi

The following lines steer U.

Dim _Con As New SqlConnection("...")

Dim _Com As New SqlCommand("Select * from ...", _Con)

_con.Open()

Dim _DTable As DataTable = _Com.ExecuteReader.GetSchemaTable()

DataGrid1.DataSource = _DTable

Pandian S

|||

ColumnName ColumnOrdinal ColumnSize NumericPrecision NumericScale IsUnique IsKey BaseServerName BaseCatalogName BaseColumnName BaseSchemaName BaseTableName AllowDBNull ProviderType IsAliased IsExpression IsIdentity IsAutoIncrement IsRowVersion IsHidden IsLong IsReadOnly DataTypeName XmlSchemaCollectionDatabase XmlSchemaCollectionOwningSchema XmlSchemaCollectionName UdtAssemblyQualifiedName NonVersionedProviderType unit_id 0 8 19 255 unit_id 0 bigint 0

Using the GetSchemaTable method does not work. Above is a listing of what I retrieved for a database table, where a description for unit_id should exist.

/Steffan

How can I get the SQL Server 2000 Column Description

How can I get the SQL Server 2000 Column Description within ADO.NET 2.0?

BR / Chris

Hi

The following lines steer U.

Dim _Con As New SqlConnection("...")

Dim _Com As New SqlCommand("Select * from ...", _Con)

_con.Open()

Dim _DTable As DataTable = _Com.ExecuteReader.GetSchemaTable()

DataGrid1.DataSource = _DTable

Pandian S

|||

ColumnName

ColumnOrdinal

ColumnSize

NumericPrecision

NumericScale

IsUnique

IsKey

BaseServerName

BaseCatalogName

BaseColumnName

BaseSchemaName

BaseTableName

AllowDBNull

ProviderType

IsAliased

IsExpression

IsIdentity

IsAutoIncrement

IsRowVersion

IsHidden

IsLong

IsReadOnly

DataTypeName

XmlSchemaCollectionDatabase

XmlSchemaCollectionOwningSchema

XmlSchemaCollectionName

UdtAssemblyQualifiedName

NonVersionedProviderType

unit_id

0

8

19

255

unit_id

0

bigint

0

Using the GetSchemaTable method does not work. Above is a listing of what I retrieved for a database table, where a description for unit_id should exist.

/Steffan