Custom Code Only Works In Header && Footer But Not In Details?

Aug 8, 2007

hi,

I have a custom code that can gets string from an array:

Public Shared FormatArray() As Object
Public Shared Function GetFormat(ByVal _Col As Integer) As String
Return FormatArray(_Col)
End Function

However if I place the code in a Table details value expression =Code.GetFormat(0), It will give me #ERROR

But if I put in the Table Header row value, then it shows me the String correctly, same for in Footer of the table.
Its only within the details rows that is not working

Does anyone know what is the problem??

many thanks

Jon

View 6 Replies


ADVERTISEMENT

How To Create A File With Header, Details & Footer

Aug 31, 2006

Hi All,

I need to create a query which gives me something like this

HH20060831160342
DDasb IT 3000
FF20060831160709000000001


Where 'HH' is the header(followed by Date and time) and 'FF' is the footer (followed by Date, time and no of records)and 'DD' has some details (few fields) from database.I am using UNION to get this result but the problem is that if the count in the footer is 0 then query should not give any output.but If I am using the following query
select 'HH'+convert(varchar,getDATE(),112)+replace(convert(varchar,getdate(),8),':','') as filename,'' as name,'' as dept,'' as sal
union all
select 'DD'+'',filename,dept,sal from emp where empno like '%1%'
union all
select 'FF'+convert(varchar,getDATE(),112)+replace(convert(varchar,getdate(),8),':','')+ REPLICATE(0, 9-len(COUNT(*)))+''+convert(VARchar(10),COUNT(*)) as filename,'' as name,'' as dept,'' as sal from emp where empno like '%1%'

I am getting the result as


HH20060831161226
FF20060831161226000000000
if the second select statement has no records

Please help

View 3 Replies View Related

Code!func To Get Values In Header Only Works In IDE And Not Deployed Report (also Worked Ok In RS2000)

Jul 18, 2007

I have code



Function GetDealCount(reportItems)

return iif(IsNothing(reportItems!txtDetailCountRows.Value), 0, reportItems!txtDetailCountRows.Value)

End Function

Function GetSumNotionalAmount(reportItems)

return iif(IsNothing(reportItems!txtDealSumNotionalAmount.Value), 0, reportItems!txtDealSumNotionalAmount.Value)

End Function



That I am calling from a textboxes in the page header

= Code.GetDealCount(ReportItems) & " Deal(s)"

also

= Parameters!BaseCurrency.Value + " " + Format(Code.GetSumNotionalAmount(ReportItems),"N2").ToString().Replace(",","'")





When I preview the report in VS.NET I get values showing.

When I deploy the report I just get #Error showing.



Also this report used to work fine in RS2000



Does anyone know the cause of this issue?

View 6 Replies View Related

Parameters In Header And Footer

Mar 16, 2007

why data cannot be shown using (a field parameter and table field) in page header and footer?

thanks

-Ron-

View 2 Replies View Related

How To Add A Group Header And Footer For A Report

Jan 9, 2007

I have a report that is being called via stored proc, and i want to group by contract. when report gets generated i get multiple contracts info. but will be grouped/sorted by contract.

please how can i have a group header and also a group footer to show a summary of each contract information with some calculated fields in it.

i may get 100 records related to 10 contracts , 10 rows for each contract.

as soon as the first contract info is shown on the report it has to show a summary related to the first contract in the group footer, and then continue populating the second contract info and so on.

Please i am totally new to reporting and help would be appreciated. thank you all.

View 2 Replies View Related

How Do You Edit A Group With No Header Or Footer?

Jun 5, 2006

I am new to SSRS 2005 and so far the only way I can figure out how to edit groups in a table is to right click on the group header or footer and select Edit Group. But how would you edit the group if you chose to not have a header or footer? And how would you delete the group for that matter? I'm looking for something like the Crystal Reports Group Expert.

View 4 Replies View Related

Can I Use PageNumber Outiside Of Header And Footer?

Mar 25, 2008



I want to display a header group in a table but only in the first page.
I saw the option Repeat group header in the group properties but if I don't check that option the space of the header disapear.
I want to show the header in the first page and a blank space in the rest of page.

Thanks

View 12 Replies View Related

I Want To Make Sure The Header/footer Is On Each Next Page

Feb 13, 2008


The problem I am running into is I want to make sure the header/footer is on each next page,if the grade report goes more than 1 page (so pages aren't separated from each other or mixed up).
I could put a textfield as a footer at the bottom the list control but that would just appear at whatever length page 2 ended up being (basically you could have a "footer" at mid-page if the whole list only took up 1.5 pages).


Thanks & Rgds
Neelesh Gour

Mail:neeleshgour@gmail.com

View 1 Replies View Related

Draw A Rectangle Box From Header To Footer

Feb 20, 2008



Hi all,

I've found trouble to draw neither a line nor a rectangle box from header section to footer section including the body section. Please help.

brgs,
Jeff

View 4 Replies View Related

Integration Services - Header And Footer

Jul 2, 2007

I have been struggling to get this right in Integration Services, Would really appreciate the help.


Basically I have a file with fixed length columns that I would like to import into my database using Integration Services, the file looks something like this

AN_HeaderRecord0001Testfile.txt
MyName MySurname 0127721506
MyName2 MySurname2 0127722322
FooterRec0000000004_02

What I need to find out is how do I import the data, the name and surname and telephone no, but skip the header and footer records. Also I need to be able to use the header and footer data for later use.

Any ideas ?

View 9 Replies View Related

How To Reader Header And Footer In EBCDIC File?

Jun 19, 2007

I have data arriving in fixed-width EBCDIC format. Each file contains one or more groups of records. Before and after each group there is a header/footer, which is not in the same layout as the records that it describes. Header, record and footer each have a different layout to the other but are consistent within themselves.



Thankfully the one thing header, footer and record layout have in common is their length, so at the moment, using the appropriate code page in the Flat File Connection Manager, I'm able to read all the columns as strings. The headers and footers just come through, albeit a bit weird looking, and I can filter them out with a conditional splt.



However, the header contains information that needs to be appended to each record in the group. Does anyone have any suggestions about how to achieve this? I'm trying to avoid developing a custom data source for this task but, if there's no other way, has anyone done it and do they have any tips?

View 3 Replies View Related

Report Header And Footer Size When Using Matrix

Jul 2, 2007

Hi,

Is there a way to dynamically make report header and footer fields change location (or size)? I have many matrix reports that grow in width and then the header and footers do not look good.

Another example is I have a line that is in the header...I would like this to grow to the width of the report, which again is not static on a matrix report.


Thanks.

View 2 Replies View Related

Group Header && Footer Hidden By Mistake

May 2, 2008



Hi,

I accidentally unclicked the check-boxes for group-header and group footer - I meant to leave the group header in. Now, I can't get to the group to edit it! Is there any way I can get back to it?

View 1 Replies View Related

Page Header Or Footer, Can't Use Parameters Or Globals

Feb 4, 2007

When I try to use (from page header or footer) a parameter or global or a function I wrote, I get the error below. Anyone got any ideas? Other reports within the VS 2005 project don't have this problem. Thanks....

An unexpected error occurred in Report Processing.
Object reference not set to an instance of an object.

View 2 Replies View Related

Pivot With Header And Details

Feb 3, 2014

I need to display data from both header and detail, details has to come from other table also

CREATE TABLE [dbo].[Table_Detail](
[Header_ID] [int] NOT NULL,
[Name] [nvarchar](50) NOT NULL,
[DescValue] [nvarchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

[code]....

..consider the dept code, where the values are now comming from table and need result if the data is not displayed from table and they are static..

use case when 'Bo' then 'Branch Office'
when 'Ro' then 'Reginal Office'
when 'So' then 'Sub Division Office'
when 'Ho' then 'Head Office'

How to replace my above query

Below is my sql

SELECT *
FROM
(
SELECT h.Header_ID,
td.ListNumber,
td.PhaseCode,

[code]...

View 4 Replies View Related

Header/footer: Drillthrough Link Are Not Supported In RS2005: Fix Available?

Nov 2, 2007

Hi Friends,

We are using Drillthrough links in page header/footer which is not supported in RS2005.

Is there any fix available bcas the same problem was raised one year back.

thanks

Novin

View 12 Replies View Related

Hide Header And Footer When No Data Returned On Report

Aug 23, 2007

Any suggestions on how to hide the header and footer information if there isn't any data returned on the report?

View 7 Replies View Related

Hidden Field Populating Header/footer Trick Not Working

Sep 25, 2007

I'm a bit stumped at this. I have done this before a bunch of times. The difference is that this time I have two rectangles in the footer. For the each, the visibility is set to an expression which checks whether the page is page 1 or 2. If it is 1, the first rectangle is visible, if 2, the second. When I reference the hidden fields on the main area of the report via ReportItems, they come through fine on the first rectangle, but are invisible on the second. I've tried the same exact fields and every time they are visible in rectangle1, and invisible in rectangle2. What is going on here???

View 2 Replies View Related

Added Space Character On The Header/Footer Contents Of An Exported Report In Excel

May 21, 2008

A space was added as the first character of the contents in the Left, Center and Right section of the Report Header and Footer exported to Excel. Example :

In the RDL, Header values are:

Left = "Product Report" ; Center = "Confidential" ; Right = "Page n of n"

In the exported report to Excel, Header properties (-->File.-->Page Setup--> Header/Footer Tab) are:

Left = " Product Report" ; Center = " Confidential" ; Right = " Page n of n"

Is there a way to eliminate that space character?


Thanks in advance.

View 8 Replies View Related

PDF Problem On Custom Footer (chris Hays Hack)

Dec 19, 2007

This works:
http://blogs.msdn.com/chrishays/archive/2006/09/27/ContinuedHeader.aspx



but not when exporting to PDF.

Does anyone know of a workaround?

View 1 Replies View Related

Licensing Details For SQL Server CE Cab Files To Be Used In Custom Installer

May 16, 2007

Hello All,

We have a licensed version of VS2005 and we are developing commercial C#.net mobile applications targeted for Pocket PC 2003, Windows CE etc.

We are currently making use of System.Data.SqlServerCe.dll and are using the Sql Server CE for storing and retrieving information required for the application. We use this information and send it to our hosted web server for processing.

We use NSIS installer to develop the installer for mobile application. Can we make use of the Sql Server CE CAB files (sqlce30.dev.ENU.ppc.wce4.armv4.CAB) to install or should we only use the Sql Server CE dlls that are mentioned in the REDIST.txt?

We would like to know if we would be in agreement with the EULA if we make use of the CAB files for installation instead of the direct dlls.

Best Regards,
Manasvini

View 3 Replies View Related

Data Fields In Page Header - An Answer That Works ALL The Time (Not Resolved)

Jan 11, 2008

Hi

I need data fields in the page header. The report is multiple pages. I have multiple fields I need in the page header. These fields will change on each page.

I've tried everything I can find suggested on this forum. They all either don't work or work for a while. Then, as is the case today, we get a problem with a report that renders perfectly in the RS browser but when it's output to a PDF, a couple of the page headers become confused.

Why can't Microsoft provide a hack that actually works somewhere (Maybe I just can't find it)? A sticky at the top of the forum?

I'm currently using the answer supplied by NB at AeM here http://forums.microsoft.com/msdn/showpost.aspx?postid=638813&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=1 As I said it works very nicely, thanks , except for when it doesn't export properly to a PDF which is an MS issue I presume not the solutions issue.

I really need to be able to make this work before I start throwing my toys from my pram and so my boss doesn't think I'm a complete idiot. I'm sure he doesn't believe me when I say I can't put data in a report header, after all it's only the most basic of reporting functions.

Can anyone please help with a 100% solution?


Cheers


View 5 Replies View Related

SP Works But I Need Help In Custom Paging

Jan 17, 2005

I need to be able to specify which column to sort by, BUT SQL 2000 does not allow me to

SELECT * FROM #TempTable
WHERE ID > @FirstRec
AND
ID < @LastRec
AND
EmployerID = @EmployerID
AND
Job_no = @Job_no

ORDER BY @WHICHCOLUMN asc

You can see that @WHICHCOLUMN is can be Surname, Age ETC, I have tried to make it a variable but, it started complaining of @FIRSTREC not defined, what's going on pls help, However, how do you combine dynamic queries with parameters as the say

"Sql server does not accept variables as part of sql"

my yahoo is abujajob@yahoo.com















WORKING CODE without WHICHCOLUMN

CREATE PROCEDURE [GetApplicants]
@CurrentPage int,
@PageSize int,
@TotalRecords int output,
@EmployerID int,
@Job_no int,
@WhichColumn varchar,
@SortBy varchar
AS
--Create a temp table to hold the current page of data
--Add and ID column to count the records
CREATE TABLE #TempTable
(
ID int IDENTITY PRIMARY KEY,
Job_no int,
EmployerID int,
JobseekersID int,
Email varchar (100)

)
--Fill the temp table with the Customers data
INSERT INTO #TempTable
(
Job_no, EmployerID,JobseekersID,Email

)

SELECT Job_no, EmployerID,JobseekersID,Email FROM ApplicantsManagement

--Create variable to identify the first and last record that should be selected

DECLARE @myStatement varchar(500)
DECLARE @FirstRec int, @LastRec int
SELECT @FirstRec = (@CurrentPage - 1) * @PageSize
SELECT @LastRec = (@CurrentPage * @PageSize + 1)
--Select one page of data based on the record numbers above

SELECT * FROM #TempTable

WHERE ID > @FirstRec

AND

ID < @LastRec

AND

EmployerID = @EmployerID

AND Job_no = @Job_no

ORDER BY surname asc

--Return the total number of records available as an output parameter
SELECT @TotalRecords = COUNT(*) FROM Customers
GO

View 1 Replies View Related

Custom Code (Embedded Code) Question

Oct 16, 2007



Hi all,

Could someone tell me if custom code function can capture the event caused by a user? For example, onclick event on the rendered report?

Also, can custom code function alter the parameters of the report, or refresh the report?

Thanks.

View 2 Replies View Related

Using Pagenumber Outside Of Page Header And Page Footer

Sep 14, 2007

can i use 'page number' and 'total pages' outside the page header and page footer?

View 1 Replies View Related

The Code Works ... But Is It Right?

Dec 11, 2006

Hi,

Is there a better (more elegant) way to build the file name than the following code:


/* File name has format mmddhhmmDX.748 with all time/date values zero padded */

DECLARE @FileName char(14)
DECLARE @out_dte datetime
DECLARE @CharDate char(8)
DECLARE @CharTime char(8)

set @out_dte = '2006-08-03 04:05:12.670'
set @CharDate = convert(char(8),@out_dte,1)
set @CharTime = convert(char(8),@out_dte,8)


set @FileName = substring(@CharDAte,1,2) +
substring(@CharDate,4,2) +
substring(@CharTime,1,2) +
substring(@CharTime,4,2) +
'DX.748'
select @FileName

/* Expected Result: 08030405DX.748 */


My first attempt was this:

DECLARE @FileName char(14)
DECLARE @out_dte datetime

set @out_dte = '2006-08-03 04:05:12.670'
set @FileName = cast(DATEPART(mm,@out_dte) as char(2)) +
cast(DATEPART(dd,@out_dte) as char(2)) +
cast(DATEPART(HH,@out_dte) as char(2)) +
cast(DATEPART(mm,@out_dte) as char(2)) +
'DX.748'


select @FileName

… but then date and time values were left justified spaced filled.
Example output: 8 3 4 8 DX.748

I don't just want to get code that works. I want to learn how to write the best possible code.

Thanks,

Laurie

View 3 Replies View Related

Integration Services :: Custom Connection Manager Only Works In 32bit

Oct 6, 2013

I have a very basic / stripped connection manager with only one property (SSIS 2012). It works fine in design time (you can open the connection manager editor and change the value), but in runtime it only works in 32bit mode. The runtime-validate-method does work, but if everything validates OK then in 64bit it throws an error when you run the package:

Exception deserializing the package "The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails.

The 2 VS projects are .Net 4 class library projects with the Build Platform on "Any CPU"

I only add references to:
Microsoft.SqlServer.ManagedDTS - C:WindowsMicrosoft.NETassemblyGAC_MSILMicrosoft.SqlServer.ManagedDTSv4.0_11.0.0.0__89845dcd8080cc91
Microsoft.SqlServer.ManagedDTS.dll
Microsoft.SqlServer.Dts.Design -

[code]....

View 11 Replies View Related

Same Exact Code Works In Vb.net But Not In C#

Feb 9, 2006

can any help me why the same exact code works in vb.net but not in C# . case is very simple
I have a table called MenuItems which has menu items and a table sizeandprice which has price for each menuitem based on the size. simple case of 1 to many relationship between menuitems table to sizeandprice table. I am trying to display in a gridview control couple of fields from menuitems table and have another template field in which i am display price and size field from the child table which is sizeand price. so basically this is how my code looks like
Page in vb works fine
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim ds As SqlDataSource = CType(e.Row.FindControl("SqlDataSource2"), SqlDataSource)
ds.SelectParameters("fkMenuItemID").DefaultValue = GridView1.DataKeys(e.Row.RowIndex).Value
End If
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PPQ_DataConnectionString1 %>" SelectCommand="SELECT [MenuItemID], [MenuItemType], [ItemName] FROM [MenuItems]"></asp:SqlDataSource>
<br />
&nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="MenuItemID"
DataSourceID="SqlDataSource1" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:BoundField DataField="MenuItemID" HeaderText="MenuItemID" InsertVisible="False"
ReadOnly="True" SortExpression="MenuItemID" />
<asp:BoundField DataField="MenuItemType" HeaderText="MenuItemType" SortExpression="MenuItemType" />
<asp:BoundField DataField="ItemName" HeaderText="ItemName" SortExpression="ItemName" />
<asp:TemplateField HeaderText="Size And Price">
<ItemTemplate>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:PPQ_DataConnectionString1 %>"
SelectCommand="SELECT [ItemSize], [ItemPrice] FROM [SizeAndPrice] WHERE ([fkMenuItemID] = @fkMenuItemID)">
<SelectParameters>
<asp:Parameter Name="fkMenuItemID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
<ItemTemplate>
<%#Eval("ItemSize")%>: <%#Eval("ItemPrice", "$ {0:F2}")%><br />
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

</div>
</form>
</body>
</html>
 
if you would notice that in order populate my repeater with childrows i need to know the menuitemid from the parent row which i do in rowdatabound event however same code in C# does not render any values for my item price and size defined inside the repeater control. here is how the c# page looks like
 
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
SqlDataSource source2 = e.Row.FindControl("SqlDataSource2") as SqlDataSource;
source2.SelectParameters["fkMenuItemID"].DefaultValue = GridView1.DataKeys[e.Row.RowIndex].Value as string;
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PPQ_DataConnectionString1 %>"
SelectCommand="SELECT [MenuItemID], [MenuItemType], [ItemName] FROM [MenuItems]">
</asp:SqlDataSource>

</div>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="MenuItemID"
DataSourceID="SqlDataSource1" OnRowDataBound="GridView1_RowDataBound" >
<Columns>
<asp:BoundField DataField="MenuItemID" HeaderText="MenuItemID" InsertVisible="False"
ReadOnly="True" SortExpression="MenuItemID" />
<asp:BoundField DataField="MenuItemType" HeaderText="MenuItemType" SortExpression="MenuItemType" />
<asp:BoundField DataField="ItemName" HeaderText="ItemName" SortExpression="ItemName" />
<asp:TemplateField HeaderText="Size And Price">
<ItemTemplate>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:PPQ_DataConnectionString1 %>"
SelectCommand="SELECT [ItemSize], [ItemPrice] FROM [SizeAndPrice] WHERE ([fkMenuItemID] = @fkMenuItemID)">
<SelectParameters>
<asp:Parameter Name="fkMenuItemID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
<ItemTemplate>
<%#Eval("ItemSize")%>: <%#Eval("ItemPrice", "$ {0:F2}")%><br />
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</form>
</body>
</html>
 
can anyone tell me what i am doing wrong?

View 1 Replies View Related

DTS Code Works Only With VS 2003 But Not With VS 2005 ?

Feb 21, 2007

Hi;

I wanted to use the following code to run a DTS package from a 2005 Web Page code behind partial class. This code works fine in a VB 2003 module

going against  SQl Srvr 2000.

Here is the code: (It initiates from a button click handler)

Dim conn As New SqlConnection("initial catalog=MY_Data;server= XYZ081552X7X441TRSQL;integrated security=SSPI")

Dim hold1 As Integer

Dim hold_source As String = ""

Dim hold_desc As String = ""

Try

conn.Open()

Catch ex1 As Exception

MsgBox("The Test connection failed to open" & vbCrLf & ex1.Message)

End Try

MsgBox("About to create a DTS object")

Dim oPackage As New DTS.Package2Class (Compiler doesn't like this line) Type DTS.Package2Class is not defined.

 

Dim oStep As DTS.Step (Or this one) Type DTS.step is not defined. 

oPackage.LoadFromSQLServer("XYZ81552X7X441TRSQL", , , DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection, , , , "cpyPrinters2Excel", )

For Each oStep In oPackage.Steps

oStep.ExecuteInMainThread = True

Next

oPackage.Execute()

For Each oStep In oPackage.Steps

If oStep.ExecutionResult = DTS.DTSStepExecResult.DTSStepExecResult_Failure Then

oStep.GetExecutionErrorInfo(hold1, , )

Else

End If

Next

oPackage.UnInitialize()

oPackage = Nothing

conn.Close()

 

Has Microsoft changed the DTS objects so that they work only with  SQL Srv 2005 ?

Thanks for your insights.

 

 

View 3 Replies View Related

Page Header And Page Footer Not Loading Report Items In The Main Report When Subreport Called?

Apr 2, 2007

Hi All,



I am having a main report having two subreports, say M1,S1 and S2 respectively.

The issue is S2 normally tend to go beyond one page, for all pages except first page of the of the subreport I am getting the page header and footer blank,

Actually this is not loading the ReportItems that are used in main report but it shows text boxes containing strings for eg . "My Name" and date functions eg Today()

Any Solution?





Thanks and Regards

Pragash

View 1 Replies View Related

Code Works Differently Based On The Provider

Jul 11, 2007

Hello



The following code does not function if I use SQLOLEDB if I omit the provide and default to ODBC OLE DB it works correctly. I am assume I am coding something wrong for a SQLOLEDB provide. Any help is greatly appricated.



VB Code




Public Function SqlExecuteResult(xSQL As String, sServer As String, sDatabase As String, sUserName As String, sPassword As String, sCaller As String, Optional bLog As Boolean = False) As Object


Dim oDB As Object
Dim oRS As Object

Set oDB = CreateObject("adodb.connection")
Set oRS = CreateObject("adodb.recordset")

oDB.open "driver={SQL Server};provider=sqloledb;server=" & sServer & ";database=" & sDatabase & ";uid=" & sUserName & ";pwd=" & sPassword & ";"
oRS.CursorLocation = adUseClient
oRS.CursorType = adOpenStatic
Set oRS.ActiveConnection = oDB
oRS.open xSQL
Set oRS.ActiveConnection = Nothing
Set SqlExecuteResult = oRS
oDB.Close
Set oDB = Nothing

End Function


Private Sub Form_Load()
Dim rs As Object
Set rs = SqlExecuteResult("exec NextEntry 'SentMessages'", "surecomp-bob", "pmsureus33", "sa", "", "")
MsgBox rs.fields(0)
End Sub




SQL proceedure



CREATE PROCEDURE NextEntry @CounterName Varchar(20) AS

begin
declare @counter int
select @counter = counter from counters where countername = @counterName
select @counter = @counter + 1
update counters set counter = @counter where countername = @countername
select counter from counters where countername = @counterName
End
GO




Thanks



Bob Jenkin

View 1 Replies View Related

How To Convert Pl/sql Code Of Oracle To Something Equivalent Which Works On Sql Server 7.0?

Dec 21, 2000

i had worked on oracle 8i and i am planning to work on sql server 2000,i am requested by a company to help in converting there pl/sql code of oracle 8.0 to something equivalent which works on sql server 7.0 as they want to have similar code on both..i had not worked on sql server 7.0 ,but as pl/sql code works only on oracle stuff..so could kindly anyone guide me in this as to whether there is any product which coverts pl/code (the existing pl/code runs into thousands of line) automatically..i will be very grateful if anyone can enlighten me with such a product(software) or script.. along with its information and site address..any resources and any guidance as to how to go about about this conversion will be very invaluable..hope to hear soon from you guys...early response....will be appreciated..

with regards,

vijay.

sql server 7.0 on winnt
pl/sql code on oracle 8.0

View 2 Replies View Related

Can I Write A Dll(or Share The Same Code) That Works On Both Mobile Device And Pc?

May 4, 2007

hi,

Can I write a dll(or share the same code) that works on both Mobile device and pc? Since we are using compact edition, we are hoping we can write some common module with the same code that could works on both mobile device and pc platform. I noticed the reference is the same, System.Data.SqlServerCe.dll 3.0.

Another question is, we already have a module for SQLCE2.0, with .net CF1.0. Now, we will start to use compact edition, should we just update on the 1.0 one, or we have to write a different one based on .net CF2.0? Can I use compact edition in CF1.0 dll?



Thanks.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved