|
Use RegisterStartupScript to embed in you c# code
Parwej Ahamad
|
|
|
|
|
you can show me the specific source is not?
|
|
|
|
|
i created a form, but later noticed that i have four rows of student data for 1 ID, how do i bring back the four rows of data?
Ferron
|
|
|
|
|
Your DB is obviously broken. You can do a select to get the four rows, but if they have the same Id, then you have a bigger issue.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
they have the same id, but different addresses, so i wanna be able to print all those addresses
Ferron
|
|
|
|
|
is it the way you (outer) join the data in SQL?
Could you post your query
|
|
|
|
|
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_getTransfer] (@TRANSFER_ID int) AS
-- Declare variables
DECLARE @rc Int
SELECT TransferDetails.IMID,TransferDetails.[DESCRIPTION], TransferDetails.AMOUNT,TRANSFERS.AMOUNT_TRANSFER, TRANSFERS.CONSIDERATION, TRANSFERS.TRANSFER_ID,
TRANSFERS.[DATE], TransferDetails.CURR, CUSTOMERS.CMF_NAME_1, CUSTOMERS.CMF_NAME_2,
CUSTOMERS.CMF_ADDR_1, CUSTOMERS.CMF_ADDR_2, CUSTOMERS.CMF_ADDR_3, CUSTOMERS.CMF_ADDR_4,
CUSTOMERS.CMF_POSTAL_CODE, TRANSFERS.Cons_Curr
FROM
("FGBInvestment"."dbo"."TransferDetails" "TransferDetails" INNER JOIN "FGBInvestment"."dbo"."TRANSFERS" "TRANSFERS" ON "TransferDetails"."TRANSFER_ID"="TRANSFERS"."TRANSFER_ID") INNER JOIN "FGBInvestment"."dbo"."CUSTOMERS" "CUSTOMERS" ON "TRANSFERS"."CUSTODIAN"="CUSTOMERS"."CMF_ACCOUNT"
WHERE "TRANSFERS"."TRANSFER_ID"= @TRANSFER_ID
Ferron
|
|
|
|
|
I had a look at your query and it seems fine. When you say that you have 4 rows for the same customer ID, do you mean that "CUSTOMERS"."CMF_ACCOUNT" has the same value?
If that's your key column (is it appears to be based on the query), I think your data is corrupted. If that's the key column of customers, it should be either primary key or unique key and there would be no duplicates.
|
|
|
|
|
When i run the query i found that there was a record with 4 different IMID, but the same transfer_id, i want to print those four records on to my form (aspx page)
Ferron
|
|
|
|
|
Based on your query, IMID is a column in TranferDetails and Tranfser_ID is the key column for Transfers, correct?
So if you have four rows in TransferDetails for a single transfer_ID, this query will result to four rows. Isn't this what you got when running the query?
I'm bit confused since if the situation described above is what you are experiencing, I don't see where the problem is. Or is the problem that your query actually returns four rows, but you're unable to show them simultaneously on aspx page?
|
|
|
|
|
yes man, that's exactly what i want too do, thank you man, thank you. Can you show me how ? an example maybe?
Ferron
|
|
|
|
|
I'm sorry but if the problem is in the aspx, that's something where I'm not able to help you.
I suggest that you try ASP.NET[^]-forum. I believe you would get good answers from there.
|
|
|
|
|
I have a form that pulls data from database, and drops it in labels. Is there a way to print multiple instances of that form, one below the other to represent two records?
Ferron
|
|
|
|
|
You can take screenshots by using the method that draws the form onto a graphics object, then build an image to print.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
There are several examples of printing code on this site. Did you perform any kind of search before posting your question?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
It would be nice if you directed me to them
Ferron
|
|
|
|
|
No, it would be pandering to your laziness.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I created an activex com object and would like to create an instance in a c# form. when adding the component with the wizard it creates a new instance with "new" end every C# exe gets its one inctance. I am looking for the equivalent C# whay to CoCreate: create the com object only if not exists, get the currantly active instance otherwise. I think the solution lies somware in interop services but failed to find a solution so far....
|
|
|
|
|
C# doesn't have an equivalent to CoCreate, its all hidden behind the interop wrapper. You just have to create an instance of the object in question. If you want a single instance of this object then you need to use a Singleton pattern.
only two letters away from being an asset
|
|
|
|
|
hi friends,
i have read the Stream of the webpage code is
String page = "http://www.google.com";
HttpWebRequest site = (HttpWebRequest)WebRequest.Create(page);
HttpWebResponse response = (HttpWebResponse)site.GetResponse();
Stream dataStream = response.GetResponseStream();
StreamReader read = new StreamReader(dataStream);
String data = read.ReadToEnd();
Now i need to Get the Href of all the images used in this Webpage so that i can download it one by one how can i serach Href and get the link out of it.
WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP
|
|
|
|
|
You probably want to use a regular expression to get the <a> tags in the page and then strip the href out of them.
|
|
|
|
|
See this[^] article
*jaans
|
|
|
|
|
Gents,
I have the following problem that drives me insane. I've written a service that runs in the background. However, I can't get the DateTime format right. I must have tried everything to get it right, but to no avail. When the service starts or stops, it will tell me by writing to a log file. The output of the log file looks like this :
1/19/2009 1:48:40 PM Manager: Service Stopped<br />
1/19/2009 1:48:43 PM Manager: Service Started<br />
1/19/2009 2:17:05 PM Manager: Service Stopped<br />
1/19/2009 2:17:29 PM Manager: Service Started<br />
1/19/2009 2:18:02 PM Manager: Service Stopped<br />
1/19/2009 2:20:27 PM Manager: Service Started
Now .. When it writes to the logfile, it uses the above format for DateTime.Now , while I want to use "dd-mm-yyyy HH:mm:ss"
I set the regional setting in Control Panel as well as the Date and Time format. It shows up perfect in my system clock. It still spits out the above to the logfile. Then I tried the following in my code, so set it programmatically :
static void Main()
{
CultureInfo newCulture = new CultureInfo("en-US", false);
newCulture.DateTimeFormat.FullDateTimePattern = "dd-mm-yyyy HH:mm:ss";
System.Threading.Thread.CurrentThread.CurrentCulture = newCulture;
System.ServiceProcess.ServiceBase[] ServicesToRun;
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new RealTime() };
System.ServiceProcess.ServiceBase.Run(ServicesToRun);
}
That didn't fix it .. still the same output.
When I put a MessageBox in between somewhere to let me show DateTime.Now.ToString() , it also comes back with 1/19/2009 2:20:27 PM. Some of the methods in the service report an invalid <code>DateTime</code> conversion when I try the following code :
DateTime time = Convert.ToDateTime("19-01-2009 13:12:56");
It drives me insane. Can please someone point me in the right direction ?
Kind regards,
|
|
|
|
|
You can try this line:
DateTime.Now.ToString("MMM dd,yy HH:mm:ss", CultureInfo.InvariantCulture)
I think it will solve your problem
|
|
|
|
|
Thank you for your feedback,
it does indeed fix half of my problem. I can get the date right in the logfile, however .. it will not fix the below calculation :
DateTime lastTime = Convert.ToDateTime(dt.Rows[lastRow]["date"].ToString());
Where the value in the DataTable is "19-01-2009 13:45:59", the error is :
1/19/2009 4:34:24 PM System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.DateTime.Parse(String s, IFormatProvider provider)
at System.Convert.ToDateTime(String value)
at Loudnixx_RealTime.RealTimeRadar.ExceedTrackTime()
at Loudnixx_RealTime.RealTimeRadar.ProcessString(String dat)
at Loudnixx_RealTime.RealTimeRadar.Listen()
Somehow there has to be a way to set it globally throughout the program.
Can you point me in the right direction ?
kind regards,
|
|
|
|