|
Did anyone know how to import the CSV file into MSSQL database using ASP.net. I'm using the vb script to develope the page. This is urgent.. If anyone know how to solve this problem, please post the sample coding here. Me will appreciate on your help. Thanks..
-- modified at 5:17 Wednesday 5th July, 2006
|
|
|
|
|
Hello All,
How to send values from one page to another in asp.net,
Can any body suggest me how to do the above....
thanks in advance
shree
|
|
|
|
|
There are various ways..Through Session objects,Query Strings ..All depends on your requirement
Check this :
http://msdn2.microsoft.com/en-us/library/50x35554.aspx
|
|
|
|
|
|
|
you can declare those variable as public shared which makes them able to access from one page to another page.
kavitabhat
|
|
|
|
|
Hi all
I am trying to save Database table reslut in EXCEL file
It is working fine but i want to print in another way
--------------------------------------------------------------
Exampel : My program printing like this
--------------------------------------------------------------
Code Month
-----------------
1 Jan
1 Jan
1 Jan
2 Feb
2 Feb
But i want print like this
-----------------------------
Code Month Code Month Code Month
----------------------------------------------------
1 Jan 1 Jan 1 Jan
2 Feb 2 Feb
Means if the Month is same i want to print in same line
I am using this code for saving excel
----------------------------------------
Dim i As Integer
Dim strLine As String, filePath, fileName, fileExcel, link
Dim objFileStream As FileStream
Dim objStreamWriter As StreamWriter
Dim nRandom As Random = New Random(DateTime.Now.Millisecond)
Dim fs As Object, myFile As Object
Dim cnn As OleDbConnection = New OleDbConnection("Provider=SQLOLEDB;server=--;uid=--;pwd=--;database=Northwind")
fileExcel = "WWSS.xls"
If Not Directory.Exists(("c:\WW")) Then
Directory.CreateDirectory(("c:\WW"))
End If
filePath = ("c:\WW")
fileName = filePath & "\" & fileExcel
objFileStream = New FileStream(fileName, FileMode.Append, FileAccess.Write)
objStreamWriter = New StreamWriter(objFileStream)
cnn.Open()
Dim dr As OleDbDataReader ' SqlDataReader
Dim sql As String = "select * from ww "
Dim cmd As OleDbCommand = New OleDbCommand(sql, cnn)
dr = cmd.ExecuteReader()
For i = 0 To dr.FieldCount - 1
strLine = strLine & dr.GetName(i).ToString & Chr(9)
Next
objStreamWriter.WriteLine(strLine)
strLine = ""
While dr.Read()
For i = 0 To dr.FieldCount - 1
strLine = strLine & dr.GetValue(i) & Chr(9)
Next
objStreamWriter.WriteLine(strLine)
strLine = ""
End While
dr.Close()
cnn.Close()
objStreamWriter.Close()
objFileStream.Close()
Is this posible from this code
If not Plz can any one tell me a another way to print
"If the Month is same i want to print in same line "
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi,
I have created an ActiveX dll in MFC. I need it to be installed in client's browser, So that it works in my web page. How could I do that?
Any Help?
Regards
Rams.
Be simple and Be sample.
|
|
|
|
|
Hello Rams
You have to registar in your activex in your tools
then you can access all methods inside the Active X
bye
|
|
|
|
|
Hi Ram,
Need to register in vs.net 2k3 or add in reference vs.net 2k5.
Dasri
|
|
|
|
|
Hai
I have been using Microsoft Application Data Block 2.0 in my ASp.net 1.1 applications . Now we are going to migrate to VS 2005 . Is there any new version / similar applcation block to use with 2005 projects
|
|
|
|
|
|
Hi all,
I am posting this thing second time as i m not able to solve this yet.
I have a dataset and a link(a href). when somebody click on that, the data from the dataset should be downloaded in to the excel file.i m working in sharepoint portal and creating web part using C#.I surf forums, which has the solution for this.But it include creating a class and a method. The thing is that, we dont have any onclick event for HyperLink in ASP.NET. if any solution with javascript, that's good too.If, any body can help me in this problem it would be appreciated.
Thank you very much.
NIKI
|
|
|
|
|
hi,
You can create DTS package for this. DTS package will accept the DS as parameter and fill the sheet. In excel sheet you have to make template with the name range. So, while filling the excel sheet, DTS package refer that name range.
Naishadh Mandaliya
|
|
|
|
|
Hi Naishadh,
Thanks for the quick response.
But, to be very honest, I am new in the sharepoint environment.I know, how to export data to excel in asp.net,but not in sharepoint.If you can give me some details or some type of code, that will be great for me.
Thanks,
NIKI
|
|
|
|
|
I have hosted a site through some hosting site...Well...After i had uploaded the pages, it worked fine whole night..But without any changing the code or anything else also...Now all of a sudden it shows the error to be
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Policy.PolicyException: More than one exclusive group is not allowed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[PolicyException: More than one exclusive group is not allowed.]
System.Security.Policy.PolicyLevel.GenericResolve(Evidence evidence, Boolean& allConst) +2723202
System.Security.Policy.PolicyLevel.Resolve(Evidence evidence, Int32 count, Char[] serializedEvidence) +124
System.Security.PolicyManager.CodeGroupResolve(Evidence evidence, Boolean systemPolicy) +182
System.Security.PolicyManager.ResolveHelper(Evidence evidence) +95
System.Security.HostSecurityManager.ResolvePolicy(Evidence evidence) +32
System.Security.PolicyManager.Resolve(Evidence evidence) +72
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +148
System.Security.SecurityManager.ResolvePolicy(Evidence evidence
and much more trace is done..Can someone please tell me whether the problem is with my coding now or with webserver hosting company..so than i can ask them in detail whats wrong with my site now...
|
|
|
|
|
Hi ,
as you know in asp.net 2.0 you can go to the menu select web site & then asp.net web site configuration like that you can configure tracing , debuging , security , roles ....
but in asp.net 1.1 (VS 2003) i didn't find that item in the menu neither (asp.net web site configuration)
can you tell me where can i find those items please ?
thank you very much
try to be good if you can't be the best
|
|
|
|
|
Hi there,
This menu item is only supported in VS 2005, in VS 2003 with the ASP.NET 1.1 you may look for a third party configuration tool like this one[^].
|
|
|
|
|
Hi thanks but do you mean i have to purchase this software to configure my application ? i think vs 2003 supports something else that allows doing the same stuff but i didn't find it
you said i have to look for a configuration tool , i sought for it but i found nothing,can you tell me where can i find that please ?
try to be good if you can't be the best
|
|
|
|
|
hello
I need a link that can help me how can I create crystal report in Asp.net (Vb.net2005) ( for begining )
thanks for your help
dadax
|
|
|
|
|
|
I have been experimenting with placing user controls (using Windows Forms controls) into an ASP.NET webpage - and am completely stuck. I can get a blank user control to work, but nothing beyond that. I have tried making a very basic test rig to isolate the problem, and have illustrated it below. For reference, this is using .NET 2 and Visual Studio 2005.
Here's what I did - the first few steps explain what worked, then what I did that broke it. If anybody can see the obvious thing I'm missing, I'd love to hear from you.
1. Create a new "Control Library" solution - call it "UserControlTestRig"
2. Modify the background color of the default control (UserControl1)
3. Compile, and test. The user control debug form pops up, and it works fine.
4. Add a new ASP.NET website to the solution
5. Copy the compiled DLL of the user control to the root dir of the website
6. Refresh the explorer in Visual Studio (to stop it complaining further on)
7. Add the following to the default.aspx page...
<object id="uc1"
classid="UserControlTestRig.dll#UserControlTestRig.UserControl1">
</object>
8. Run the webpage - it appears, as does the user control with it's background
color as set when we built it.
All is fine so far. Next I do the following, and have no idea why it breaks...
9. Edit UserControl1 - add a label control to it (from the standard windows form
controls)
10. Recompile UserControl1, and copy the DLL over to the web page.
11. Re-open the webpage, to see the usercontrol with the label...
*The control no longer works.*
What's more, once the control is broken, you can't then recompile without the label, re-copy, and run the webpage again...
If somebody can explain why this is happening I'd love to know.
The maddening thing is I have a fairly complex series of controls that this happened to this morning, and have spent all afternoon slowly going backwards until I got to this example - at which point I held my hands up and said "I'm going to ask on the internet"...
|
|
|
|
|
Getting somewhere... it's *something* to do with replacing the user control DLL.
If I re-compile the user control and replace the one in the web root, the webpage no longer shows the object.
If I destroy the website and make it again, it works once more - and (as you might predict) if I rebuild the user control again, the webpage no longer shows it...
Any ideas why ???
|
|
|
|
|
You may try to delete the Download cache with the command gacutil /cdl , then launch the web page again in a new browser.
|
|
|
|
|
I found *a* solution to it late last night.
The behaviour (recompiled user controls vanishing) only occurs in the Visual Studio 2005 web server. If you create an IIS website and put the compiled user control there, it works.
Therefore (at this time) I can only deduce that the problem - if it is a problem - exists with the mini webserver built into VS2005.
Hope this helps somebody else one day...
|
|
|
|