Showing posts with label application. Show all posts
Showing posts with label application. Show all posts

Friday, March 30, 2012

Runtime error 3704

Hi,

I've created an application that runs on several pc's. However, on one particular pc, when I run the following code to test the connection to the SQL server, it generates the error "Runtime error '3704'" and it happens only when it hits the Form1.Users.Movefirst section.

I've checked all the user permissions on the server and dont seem to find any difference there.

code:-

Option Explicit
Public Db As New ADODB.Connection
Public Users As New ADODB.Recordset

Private Sub Command1_Click()

If Not Form1.Users.BOF Then
Form1.Users.MoveFirst
End If

With Form1.Users
Do While Not Form1.Users.EOF
Debug.Print Form1.Users.Fields(0)
Form1.Users.MoveNext
Loop
End With

End Sub

Private Sub Form_Load()

On Error Resume Next
Set Db = Nothing

Db.Open _
"Provider=SQLOLEDB.1;Server=File;" & _
"Database=Cash Management;Trusted_Connection=Yes"

'Open the recordsets
With Form1.Users
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.ActiveConnection = Form1.Db
.Source = "Select * from Users order by userid"
.Open "SET NOCOUNT ON"
End With

End Sub

ThanksIt is very simple. You are running "SET NOCOUNT ON" only. What MDAC version do you use?|||Hi.. Thanks for your reply. Normally, my .open has nothing after it. Only after I searched on the net, did I add that "Set NoCount On", but it didn't help. Sorry to sound ignorant, but how do I tell what ver of MDAC I'm using ?

Carl|||Q1. What MDAC version am I using?
A1. Use regedit.exe, see branch "HKEY_LOCAL_MACHINE\Software\Microsoft\DataAccess" node "FullInstallVer"|||It looks like 2.70.7713.4.

Tks..|||You added "SET NOCOUNT ON" for test purposses only, remove it.
In your code, after the part where you try to open a connection,
add a check (+msgbox) to know if it is really connected.
It can be a domain security problem.|||Ok - I checked the registry on the pc that I was installing on and I see the version of MDAC is 2.53.6200.1. This is the same as another pc that is working.

If this is not the problem, I suspect that it is a permissions problem, but I have no idea where to check as this user has been registered exactly the same as the other users that work.

Thanks|||Run (for W9x)
command /K net config
from Start->Run commandline on the client machine and you will see his logon info (or ask him to do it and send results).|||My email address is alkemac@.hotmail.com. Can you please send an email and I will reply with screen shots of the different screens, including the SQL Svr user registration screen ?

Thanks|||It was a user default database problem. The user solved it by himself.|||What do you mean by "default database problem"? Can you explain how the user solved it himself? We have a similar problem with a VB application that opens an Access database. It runs on most computers, but not some. One gets the 3704 runtime error. Thanks.sql

Run-time error

Hello All:
I am in desparate need of assistance. We are using an application called PaperVision Enterprise which takes scanned invoices and puts them into a database for the purpose of easy reference to any scanned invoice in the db. 2 weeks ago while trying to perform a 'match and merge' of the newly scanned docs, we received a Run-time error '-2147217871 (80040e31)": Timeout expired message. After being told by the company who supports this software that they couldn't help me since it is using a MS SQL Server Table Lookup I started googling the error with minimal success. I am not very proficient with SQL so I'm kind of stuck. I have narrowed this down to an ODBC run-time error, but looking for some kind of guidance as to how I can resolve it. Any info would be greatly appreciated. We are using MS SQL Server 2000.Timeout expired errors are bad to deal with. They are not particularly bad for the data, but they are a pain to track down. The short of it is the client is giving up on the server, after the server takes 30 seconds (default) to return a message about the success or failure of the command. The easiest fix is generally to have the vendor increase their commandtimeout value. Outside of that, you would have to check to see if it is time to purge old documents, reindex tables (if the database is on the order of 10GB or more), or check to see what other activity is going on on the SQL Server (is someone running a giant report at the same time?). Good luck.|||We actually faced this problem 4 years ago on SQL Server 2000. The issue was resolved first by increasing the timeout value in the ASP application code itself (as a temporary measure). However, after tuning the query so that it executed much faster, we switched back to the default timeout in the ASP application code. Everything went fine. If this is static data (committed data) that you are matching and merging, it would be better to use the WITH (NOLOCK) hint to start with. Of course, the query would still have to be optimized. Another case was when a query (with around 5 joins between different tables) was causing Exception Access Violation and failing. When optimized, it ran in a split second with no issues. [As per a Forrester Report (I don't have a copy of it with me right now), 50-60% of database performance issues are caused by the quality of the code.]|||I have increased the timeout value, but still have the same issues. As for the other suggestions, could you possibly recommend any books that would explain how to do some of these things, since I don't know much about SQL?|||I wouldn't use WITH (NOLOCK) unless you know with certainty that the tables involved are not being written to.

It has its own sets of problems since it means you will be doing dirty reads, and can even cause new errors if page splits, etc, occur during the read.

For tips on optimizing queries, start reading the beginner articles at http://www.sql-server-performance.com

runtime dlls issue of PowerBuilder

Hello All,
I have a PowerBuilder application in implementation phase rightnow. I have come to know that without registering craxdrt.dll, crviewer.dll, crdesignerctrl.dll , crqe.dll and crdo32.dll I am unable to preview report. I am not comfortable registering dlls in each desktop so would like to know how does this work in PowerBuilder. I am desparately looking for an answer. If somebody could help I will appreciate that.

Thanks
DilemmaHi, Dilemma. Did you have any solutions for your mentioned problems? It is because i am also facing same problems with you now.

If somebody could help, I will also appreciate that.

Thanks a lots!

Lily|||I am sorry lilly. If you are still struggling to get an answer then feel free to ask me.

Dilemma
http://www.dilemmaguru.com|||Hello All,
I have a PowerBuilder application in implementation phase rightnow. I have come to know that without registering craxdrt.dll, crviewer.dll, crdesignerctrl.dll , crqe.dll and crdo32.dll I am unable to preview report. I am not comfortable registering dlls in each desktop so would like to know how does this work in PowerBuilder. I am desparately looking for an answer. If somebody could help I will appreciate that.

Thanks
Dilemma

I have the same problem, can someone help me
Mike
evolna@.yahoo.com|||Hi there,
Actually i havn't got ur prob clearly.Anyway i would like to put forward whatever i know about how powerbuilder(PB) deals with DLLs.
Whenever PB come across a reference to any Dll function, it will search in 4 locations.
1.The current directory
2.The Windows directory
3.The Windows System subdirectory
4.Directories on the DOS path

hi Dilemma,
i didnt understand why u mentioned the Dlls craxdrt.dll, crviewer.dll, crdesignerctrl.dll , crqe.dll and crdo32.dll . I believe those are crystal reports Dlls. Are u using Crystal reports along with powerbuilder?

arfath@.gmail.com|||Hi I am runnignpowerbuilder 10 and want to run crystal reports from PB. I have the following code :

// create OLE object
g_ole_crx_application = CREATE OLEObject

// connect to craxdrt.Application
gi_return = g_ole_crx_application.ConnectToNewObject('CrystalRuntime.Application.11')
if gi_return < 0 then
MessageBox("Error", "Did not connect to Crystal Application Object")
return
else
MessageBox("O.K", "Connection to Crystal Application Object succeeded")
end if

gs_rpt_filename = "E:\Sybase\Crystal\Inventory Listing.rpt"

// Open the report object
g_ole_crx_report = g_ole_crx_application.OpenReport(gs_rpt_filename)

// Logon to the database
//
// Set connection_info to Report ConnectionProperties

g_ole_crx_connection_info = g_ole_crx_report.database.tables [2].ConnectionProperties

// Delete old connections
// Works with updating older reports
g_ole_crx_connection_info.deleteAll

// Add new connection
g_ole_crx_connection_info.add("DSN", "INFODEV")
g_ole_crx_connection_info.add("Database", "LinkSOLUTION")

When I run the report I get a message "Login Failed" from Crystal. Would anyy body know what could possibly be wrong.

Wednesday, March 28, 2012

Running Value in Matrix

Is is possible to have a running value in a matrix? The application has:
-- Weeks --
! 1 2 3 4 Total(Month)
!Jan x x x x Sum
Months!Feb
!...
!Total x x x x Sum
I would like to have a column after the Total(Month) that would represent
the running total for the calendar year. (Jan = Jan) (Feb = Jan + Feb)...
Thank you.Rs has a function by that very name Runningvalue... It is documented in
Rerporting Services books..
See if that is what you need.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.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
"Gary Murrish" <gmush@.swbell.net> wrote in message
news:u3chDqEYEHA.2544@.TK2MSFTNGP10.phx.gbl...
> Is is possible to have a running value in a matrix? The application has:
> -- Weeks --
> ! 1 2 3 4 Total(Month)
> !Jan x x x x Sum
> Months!Feb
> !...
> !Total x x x x Sum
> I would like to have a column after the Total(Month) that would represent
> the running total for the calendar year. (Jan = Jan) (Feb = Jan + Feb)...
> Thank you.
>|||Yes, just use the RunningValue function and your column group name as the
scope.
Fang Wang (MSFT)
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Gary Murrish" <gmush@.swbell.net> wrote in message
news:u3chDqEYEHA.2544@.TK2MSFTNGP10.phx.gbl...
> Is is possible to have a running value in a matrix? The application has:
> -- Weeks --
> ! 1 2 3 4 Total(Month)
> !Jan x x x x Sum
> Months!Feb
> !...
> !Total x x x x Sum
> I would like to have a column after the Total(Month) that would represent
> the running total for the calendar year. (Jan = Jan) (Feb = Jan + Feb)...
> Thank you.
>|||The problem is how do I drop it into the Matrix after the Total Column?
Gary Murrish
"Fang Wang (MSFT)" <fangw@.microsoft.com> wrote in message
news:eqcny2IYEHA.2964@.TK2MSFTNGP10.phx.gbl...
> Yes, just use the RunningValue function and your column group name as the
> scope.
> Fang Wang (MSFT)
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Gary Murrish" <gmush@.swbell.net> wrote in message
> news:u3chDqEYEHA.2544@.TK2MSFTNGP10.phx.gbl...
> > Is is possible to have a running value in a matrix? The application has:
> >
> > -- Weeks --
> > ! 1 2 3 4 Total(Month)
> > !Jan x x x x Sum
> > Months!Feb
> > !...
> > !Total x x x x Sum
> >
> > I would like to have a column after the Total(Month) that would
represent
> > the running total for the calendar year. (Jan = Jan) (Feb = Jan +
Feb)...
> >
> > Thank you.
> >
> >
>|||Since the value in your matrix is different from the one you want to
subtotal, you can use a different value based on the the InScope function.
=IIF(InScope("matrix1_weeks"),Sum(Fields!sales.Value),RunningValue(Fields!sales.Value,
Sum, "matrix1_weeks"))
I've posted a full example using the pubs database below.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Matrix Name="matrix1">
<Corner>
<ReportItems>
<Textbox Name="textbox1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>4</ZIndex>
<rd:DefaultName>textbox1</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</Corner>
<Height>0.46875in</Height>
<Style />
<MatrixRows>
<MatrixRow>
<MatrixCells>
<MatrixCell>
<ReportItems>
<Textbox Name="ytd_sales_1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<rd:DefaultName>ytd_sales_1</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=IIF(InScope("matrix1_pub_name"),Sum(Fields!ytd_sales.Value),
RunningValue(Fields!ytd_sales.Value, Sum, "matrix1_pub_name"))</Value>
</Textbox>
</ReportItems>
</MatrixCell>
</MatrixCells>
<Height>0.21875in</Height>
</MatrixRow>
</MatrixRows>
<MatrixColumns>
<MatrixColumn>
<Width>1.125in</Width>
</MatrixColumn>
</MatrixColumns>
<DataSetName>DataSet1</DataSetName>
<ColumnGroupings>
<ColumnGrouping>
<DynamicColumns>
<Grouping Name="matrix1_pub_name">
<GroupExpressions>
<GroupExpression>=Fields!pub_name.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<ReportItems>
<Textbox Name="pub_name">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
</Style>
<ZIndex>3</ZIndex>
<rd:DefaultName>pub_name</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!pub_name.Value</Value>
</Textbox>
</ReportItems>
<Subtotal>
<ReportItems>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
</Style>
<ZIndex>2</ZIndex>
<rd:DefaultName>textbox2</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Total</Value>
</Textbox>
</ReportItems>
</Subtotal>
</DynamicColumns>
<Height>0.25in</Height>
</ColumnGrouping>
</ColumnGroupings>
<Width>3.375in</Width>
<Top>0.625in</Top>
<Left>0.25in</Left>
<RowGroupings>
<RowGrouping>
<DynamicRows>
<Grouping Name="matrix1_type">
<GroupExpressions>
<GroupExpression>=Fields!type.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<ReportItems>
<Textbox Name="type">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
</Style>
<ZIndex>1</ZIndex>
<rd:DefaultName>type</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!type.Value</Value>
</Textbox>
</ReportItems>
</DynamicRows>
<Width>1.125in</Width>
</RowGrouping>
</RowGroupings>
</Matrix>
</ReportItems>
<Style />
<Height>2.5in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="MyReports5">
<rd:DataSourceID>adedf68c-bc44-419e-945a-ceb24c77c2e2</rd:DataSourceID>
<DataSourceReference>MyReports5</DataSourceReference>
</DataSource>
</DataSources>
<Width>6.25in</Width>
<DataSets>
<DataSet Name="DataSet1">
<Fields>
<Field Name="title_id">
<DataField>title_id</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="title">
<DataField>title</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="type">
<DataField>type</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="pub_id">
<DataField>pub_id</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="price">
<DataField>price</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="advance">
<DataField>advance</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="royalty">
<DataField>royalty</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="ytd_sales">
<DataField>ytd_sales</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="notes">
<DataField>notes</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="pubdate">
<DataField>pubdate</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
<Field Name="pub_name">
<DataField>pub_name</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>MyReports5</DataSourceName>
<CommandText>SELECT titles.*, publishers.pub_name
FROM titles INNER JOIN
publishers ON titles.pub_id = publishers.pub_id
WHERE (titles.ytd_sales > 0)</CommandText>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>6e1b5581-c1e8-493d-a6e5-4ff74ef05171</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>
"Gary Murrish" <gmush@.swbell.net> wrote in message
news:urUFKbKYEHA.3156@.TK2MSFTNGP12.phx.gbl...
> The problem is how do I drop it into the Matrix after the Total Column?
> Gary Murrish
> "Fang Wang (MSFT)" <fangw@.microsoft.com> wrote in message
> news:eqcny2IYEHA.2964@.TK2MSFTNGP10.phx.gbl...
>> Yes, just use the RunningValue function and your column group name as the
>> scope.
>> Fang Wang (MSFT)
>> Microsoft SQL Server Reporting Services
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>> "Gary Murrish" <gmush@.swbell.net> wrote in message
>> news:u3chDqEYEHA.2544@.TK2MSFTNGP10.phx.gbl...
>> > Is is possible to have a running value in a matrix? The application
>> > has:
>> >
>> > -- Weeks --
>> > ! 1 2 3 4 Total(Month)
>> > !Jan x x x x Sum
>> > Months!Feb
>> > !...
>> > !Total x x x x Sum
>> >
>> > I would like to have a column after the Total(Month) that would
> represent
>> > the running total for the calendar year. (Jan = Jan) (Feb = Jan +
> Feb)...
>> >
>> > Thank you.
>> >
>> >
>>
>

Friday, March 23, 2012

Running Sum on DataReport

Hye Guys,
I am a beginer programmer.. I have started 2 build a simple database application. I am now in the stage of showing the data in reports 2 print. I am suggested to use datareport available in VB. I also did my some of the report in it. It worked fine. But now I am stucked in one step..of displaying the calculateable field in the detail section..

Eg. in database:

Item Type Qty
A Pur 10
A Sal 3
A Pur 6
A Pur 2
A Sal 5

In Report

Item Type Qty BALQty
A Pur 10 10
A Sal 3 7
A Pur 6 13
A Pur 2 15
A Sal 5 10

Plz Help me...

Always ready 2 learn..
Kabindra Bakey

BALQty expression could be

=RunningValue(iif(Fields!Type.Value="Pur",Fields!Qty.Value,-Fields!Qty.Value),Sum,Nothing)

|||

Hi,
Thanks for your king reply. but I am confused that where should I write that expression Code ... Either in the query Builder of VB or the View of SQL Server

Hoping for your kind information..

Always Ready 2 Learn
Kabindra Bakey

|||In Report Designer (Layout view)|||

Hi,
I am really sorry that I couldn't get the Layout view of the report designer. As I already said I am a beginer, I performed the following steps. So if there is any mistake u plz help me.

Steps:
1.) Added New Dataenvironment to my project
2.) Managed the properties of the connection and pointed to my database. Test Connection also preceeded.
3.) Added New Command object to the connection.
4.) In Properties of the Command Object Managed its Name to TestObj and Its Database object to table and then ObjectName to the Name of Table.
5.) Save and Quit.
6.) Added New DataReport to my Project
7.) Set its DataSource to DataEnvironment
8.) Set its DataMember to the TESTObj
9.) Now Right CLicked on the DataReport and Click on Retreive Structure.
10.) Created text Controls for the Each of the Columns to be displayed.
11.) Now but I couldn't draw the Function control in the detail section.

So plz Help me..

|||Are you using Report Designer or something else?|||I am using Data Report Designer that is available in VB6sql

Running Sum on DataReport

Hye Guys,
I am a beginer programmer.. I have started 2 build a simple database application. I am now in the stage of showing the data in reports 2 print. I am suggested to use datareport available in VB. I also did my some of the report in it. It worked fine. But now I am stucked in one step..of displaying the calculateable field in the detail section..

Eg. in database:

Item Type Qty
A Pur 10
A Sal 3
A Pur 6
A Pur 2
A Sal 5

In Report

Item Type Qty BALQty
A Pur 10 10
A Sal 3 7
A Pur 6 13
A Pur 2 15
A Sal 5 10

Plz Help me...

Always ready 2 learn..
Kabindra Bakey

BALQty expression could be

=RunningValue(iif(Fields!Type.Value="Pur",Fields!Qty.Value,-Fields!Qty.Value),Sum,Nothing)

|||

Hi,
Thanks for your king reply. but I am confused that where should I write that expression Code ... Either in the query Builder of VB or the View of SQL Server

Hoping for your kind information..

Always Ready 2 Learn
Kabindra Bakey

|||In Report Designer (Layout view)|||

Hi,
I am really sorry that I couldn't get the Layout view of the report designer. As I already said I am a beginer, I performed the following steps. So if there is any mistake u plz help me.

Steps:
1.) Added New Dataenvironment to my project
2.) Managed the properties of the connection and pointed to my database. Test Connection also preceeded.
3.) Added New Command object to the connection.
4.) In Properties of the Command Object Managed its Name to TestObj and Its Database object to table and then ObjectName to the Name of Table.
5.) Save and Quit.
6.) Added New DataReport to my Project
7.) Set its DataSource to DataEnvironment
8.) Set its DataMember to the TESTObj
9.) Now Right CLicked on the DataReport and Click on Retreive Structure.
10.) Created text Controls for the Each of the Columns to be displayed.
11.) Now but I couldn't draw the Function control in the detail section.

So plz Help me..

|||Are you using Report Designer or something else?|||I am using Data Report Designer that is available in VB6

Running Sum on DataReport

Hye Guys,
I am a beginer programmer.. I have started 2 build a simple database application. I am now in the stage of showing the data in reports 2 print. I am suggested to use datareport available in VB. I also did my some of the report in it. It worked fine. But now I am stucked in one step..of displaying the calculateable field in the detail section..

Eg. in database:

Item Type Qty
A Pur 10
A Sal 3
A Pur 6
A Pur 2
A Sal 5

In Report

Item Type Qty BALQty
A Pur 10 10
A Sal 3 7
A Pur 6 13
A Pur 2 15
A Sal 5 10

Plz Help me...

Always ready 2 learn..
Kabindra Bakey

BALQty expression could be

=RunningValue(iif(Fields!Type.Value="Pur",Fields!Qty.Value,-Fields!Qty.Value),Sum,Nothing)

|||

Hi,
Thanks for your king reply. but I am confused that where should I write that expression Code ... Either in the query Builder of VB or the View of SQL Server

Hoping for your kind information..

Always Ready 2 Learn
Kabindra Bakey

|||In Report Designer (Layout view)|||

Hi,
I am really sorry that I couldn't get the Layout view of the report designer. As I already said I am a beginer, I performed the following steps. So if there is any mistake u plz help me.

Steps:
1.) Added New Dataenvironment to my project
2.) Managed the properties of the connection and pointed to my database. Test Connection also preceeded.
3.) Added New Command object to the connection.
4.) In Properties of the Command Object Managed its Name to TestObj and Its Database object to table and then ObjectName to the Name of Table.
5.) Save and Quit.
6.) Added New DataReport to my Project
7.) Set its DataSource to DataEnvironment
8.) Set its DataMember to the TESTObj
9.) Now Right CLicked on the DataReport and Click on Retreive Structure.
10.) Created text Controls for the Each of the Columns to be displayed.
11.) Now but I couldn't draw the Function control in the detail section.

So plz Help me..

|||Are you using Report Designer or something else?|||I am using Data Report Designer that is available in VB6

Wednesday, March 21, 2012

Running Stored procedure as....

I need to use SET IDENTITY_INSERT on several tables in one
of the Stored Procedures. The stored procedure is
executed by an application user that can not be given DBO,
db_ddladmin or any higher permissions. This makes the SET
statement fail as the user does not have the need
authority.
My question: Is there a way that I can have this
particular stored procedure run under higher authority?
That is who ever runs this stored procedure it will always
execute under the authority of a fixed given user.Sorry that functionality is not availble in the current version of SQL.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Running SSIS package from asp.net application failed

I have an asp.net web application and a web service (both of them are created in VS 2005 - asp.net 2.0). They are located on the same web server. In both web.config files, I have set <authentication mode="Windows"/> and <identity impersonate="true"/>. Also, configured the IIS settings to use Integrated Windows Authentication and unchecked the Anonymous access (for both). The web service is called from the web app, so I have to pass credentials for authentication to the web service. The web service loads and executes a SSIS package. The package and all the other sql objects are located in the sql server 2005 (windows server 2003 - the same server as the web server).

When run the web service from develop environment (vs. 2005), I get whatever I expected. When call it from web application, however, the package failed (no error message).

In the SSIS package, there are three connection managers –

· A: Microsoft OLE DB Provider for Analysis Services 9.0 à connectionType=OleDbConnection

· B: .Net Providers \ SqlClient Data Provider à connection type=SqlConnection

· C: Native OLE DB \ Microsoft OLE DB Provider for SQL Server à connectionType=OLEDB

After ran the web application and check the sql database, I can tell that the package was reached and when through the first two steps (clear some records in table_1 and extract some records from table_2 ) which relate to the connection manager B – ADO.Net connection. The remaining steps failed which are related to the connection managers A & C.

From SSIS package log file, found that the user credentials (domain and username) were correctly passed from web service to sql server 2005 at the first two events, but the credentials (or operator) changed from domainABC\user123 to NT AUTHORITY\NETWORK SERVICE after packageStart. Then, it complains … either the user, domainABC\serverName$, does not have access to the database, or the database does not exist.

I think the credentials are passed ok but some setting related to the Analysis services are not correct - complaining start from there. Any clues?

Please help and thank you all!

FYI: The problem was solved.

What I did are list as below:

A. We created a new web app pool and pointed the both web application and web service to this web app pool (which was configured not use default identity - Predefined: Network Service but use Configurable - created a new use name).

B. Under SQL server , added this new user and assign the certain rights to it.

C. In the web application and web service, set impersonate=false (instead of true)

D. In the SSIS package, we also have a flat file destination connection which is to write the output to .txt file. I give the read & write rights to this new use. then, it works.

Tuesday, March 20, 2012

running sql server data marked suspect

hi all,
I run application & database on same machine and suddenly my database marked
suspect and data base is unavailable.
I copy mdf file to other location and try to attached data but it show me
error number 3624 any one help my I don't know why the database marked
suspect and how can I resolve this problem if any one has solution of this
problem then please help me as soon as possible
Thanks in advance
Regards
khurramhttp://www.karaszi.com/SQLServer/in..._suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Syed khurram alam" <khurram.alam@.eintelligencesoft.com> wrote in message
news:e1X$u1gVFHA.2684@.TK2MSFTNGP09.phx.gbl...
> hi all,
> I run application & database on same machine and suddenly my database mark
ed suspect and data base
> is unavailable.
> I copy mdf file to other location and try to attached data but it show me
error number 3624 any
> one help my I don't know why the database marked suspect and how can I res
olve this problem if any
> one has solution of this problem then please help me as soon as possible
> Thanks in advance
> Regards
> khurram
>

running sql server data marked suspect

hi all,
I run application & database on same machine and suddenly my database marked
suspect and data base is unavailable.
I copy mdf file to other location and try to attached data but it show me
error number 3624 any one help my I don't know why the database marked
suspect and how can I resolve this problem if any one has solution of this
problem then please help me as soon as possible
Thanks in advance
Regards
khurram
http://www.karaszi.com/SQLServer/inf...suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Syed khurram alam" <khurram.alam@.eintelligencesoft.com> wrote in message
news:e1X$u1gVFHA.2684@.TK2MSFTNGP09.phx.gbl...
> hi all,
> I run application & database on same machine and suddenly my database marked suspect and data base
> is unavailable.
> I copy mdf file to other location and try to attached data but it show me error number 3624 any
> one help my I don't know why the database marked suspect and how can I resolve this problem if any
> one has solution of this problem then please help me as soon as possible
> Thanks in advance
> Regards
> khurram
>

running sql server data marked suspect

hi all,
I run application & database on same machine and suddenly my database marked
suspect and data base is unavailable.
I copy mdf file to other location and try to attached data but it show me
error number 3624 any one help my I don't know why the database marked
suspect and how can I resolve this problem if any one has solution of this
problem then please help me as soon as possible
Thanks in advance
Regards
khurramhttp://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Syed khurram alam" <khurram.alam@.eintelligencesoft.com> wrote in message
news:e1X$u1gVFHA.2684@.TK2MSFTNGP09.phx.gbl...
> hi all,
> I run application & database on same machine and suddenly my database marked suspect and data base
> is unavailable.
> I copy mdf file to other location and try to attached data but it show me error number 3624 any
> one help my I don't know why the database marked suspect and how can I resolve this problem if any
> one has solution of this problem then please help me as soon as possible
> Thanks in advance
> Regards
> khurram
>

Running SQL Scripts against SQL 2005

Our developers generate a large number of SQL scripts that get applied with each application update. Is there an easy way to select one script after the other and run them against a particular database?

Right now it appears I have to open them one by one (since the window selector is useless for actually picking a script) by scanning through the directory for the next script, confirming the connection (thankfully I'm using Integrated Security), Changing the current database (since it always defaults to master) and finally run the script. And I'm ending up doing this for every script. Hoping there's a better way to do this.

Thanks,

Larry

Management studio accepts a subset of sqlcmd statements. The one you want to use is :r. This reads the contents of the file and puts it in line with the query you have.

i.e.

:r c:\sql\myfirstscript.sql

:r c:\sql\mysecondscript.sql

go

:r c:\sql\mythirdscript.sql

in this example the first 2 scripts are combined and run. If they contain GOs in then each batch will be executed as normal.

The point to note is that the :r does execute the file but reads the file into the query. So make sure each file ends in GO or you seperate your :r statements by go.

TO use sqlcmd mode click on the icon on the toolbar with a window AND a red exclamation mark. Or go to Query and select SQLCMD mode

Tuesday, February 21, 2012

Running SQL 7 and 2000 side-by-side

I have two application to be installed on one machine. One requires SQL7 and
the other SQL 2000. Eventually we will get to SQL 2000 for both but not
today. Is there any problems I need to be aware of with this scenario?No, they will compete for memory. Make sure you install SQL 7 first.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"DianeA" <DianeA@.discussions.microsoft.com> wrote in message
news:CB00DA74-555F-40CF-AFB0-686D5A3CA63C@.microsoft.com...
>I have two application to be installed on one machine. One requires SQL7
>and
> the other SQL 2000. Eventually we will get to SQL 2000 for both but not
> today. Is there any problems I need to be aware of with this scenario?

Running SQL 7 and 2000 side-by-side

I have two application to be installed on one machine. One requires SQL7 and
the other SQL 2000. Eventually we will get to SQL 2000 for both but not
today. Is there any problems I need to be aware of with this scenario?
No, they will compete for memory. Make sure you install SQL 7 first.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"DianeA" <DianeA@.discussions.microsoft.com> wrote in message
news:CB00DA74-555F-40CF-AFB0-686D5A3CA63C@.microsoft.com...
>I have two application to be installed on one machine. One requires SQL7
>and
> the other SQL 2000. Eventually we will get to SQL 2000 for both but not
> today. Is there any problems I need to be aware of with this scenario?

Running SQL 7 and 2000 side-by-side

I have two application to be installed on one machine. One requires SQL7 an
d
the other SQL 2000. Eventually we will get to SQL 2000 for both but not
today. Is there any problems I need to be aware of with this scenario?No, they will compete for memory. Make sure you install SQL 7 first.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"DianeA" <DianeA@.discussions.microsoft.com> wrote in message
news:CB00DA74-555F-40CF-AFB0-686D5A3CA63C@.microsoft.com...
>I have two application to be installed on one machine. One requires SQL7
>and
> the other SQL 2000. Eventually we will get to SQL 2000 for both but not
> today. Is there any problems I need to be aware of with this scenario?