|
Hi Sebastian ,
I never used command builder ..i use sqlcommand object..check if it works for u ...
SqlCommand updatecmd = new SqlCommand(strSql, sqlcon);
SqlCommand deletecmd = new SqlCommand(strSql1, sqlcon);
SqlCommand insertcmd = new SqlCommand(strSql2, sqlcon);
SqlDataAdapter sda = new SqlDataAdapter();
sda.UpdateCommand = updatecmd; //here cmd generater for update
sda.DeleteCommand = deletecmd; //here cmd generater for delete
sda.InsertCommand = insertcmd ; //here cmd generater for insert
sda.Update(dsStorageArea, "StorageArea");
pallavi
|
|
|
|
|
Hi Pallavi,
Thank you very much. This method will work, the only thing is i have to avoid command builder...
Thanks once again
Sebastian
|
|
|
|
|
Hi,
I have designed a registration form using wizard control in asp.net2.0. it consists of 5 steps.
In steps 1, 2 and 4 there are some mandatory fields where the user has to fill. I kept some validations for that in those steps.
My Issue:
How can i make sure(reconfirm) in 5th step that the user has filled all the required fields in previous steps.
Please let me know your suggestions.
Many Thanks!!
Jagadeesh
|
|
|
|
|
Dear jagadeesh,
use validators like requiredfield validator etc..
then in the page_load you can check it through
page.Isvalid.
If you want to check them means use some validation summary to view the
errors otherwise use javascript for validating the data.
All The Best
Sathesh Pandian
|
|
|
|
|
Hello Sathesh Pandian,
Page.IsValid doesn't work in wizard control's finish button click event.
To be more clearer on the question i mentioned above 5 steps which means 5 different wizard pages, but not 5 input fields.
In the 5 wizard pages I kept some validations in pages 1, 2 and 4 along with validation summary controls in those three pages.
My Issue:
How can i make sure(reconfirm) in 5th step that the user has filled all the required fields in previous wizard control pages.
Please let me know how to resolve this issue.
Many Thanks!!
Jagadeesh
|
|
|
|
|
Hi i have one datagrid in that i have my dropdownlistbox...,
When i am loading some datas in my datagrid...,
Based on that data,my dropdown box data also want to display...,
Example:
if i load an employee id in that datagrid..,
Based on that employee id, his/her name want to display in that dropdown list box...,
How to do that?,
Plz help me...,
Regards,
Magi
|
|
|
|
|
Hi Magi,
consider one example. If my dropdown list have datasource which conatin employee id and employee name. your display field will be employee name and value field will be employee id. so if your datagrid is having datasource in which it contains employee id column.
it will show respective name in dropdown list column...
pallavi
|
|
|
|
|
how can I add mailed-by header to mailmessage object???
I am using
newMail.Headers.Add("Mailed-By","rebuscode.com");
but it is not showing mailed by in the header of the mail recieved by user.
hiiiiii
hiiiiii
|
|
|
|
|
Don't Repost.
Regards,
Satips.
|
|
|
|
|
Compiler Error Message: BC30002: Type 'ADODB.Command' is not defined
We are migrating asp site to asp.net after conversion of a page in asp.net when we are trying to run that page we are getting this error.
<%
Dim gi_LoginOptional As Object
Dim displayHeader As Object
Dim cmd As ADODB.Command
Dim con4 As ADODB.Connection
Dim rs1 As ADODB.Recordset
Dim g_IsLoggedIn As Boolean
Dim displayFooter() As Object
Dim i As Integer
Dim g_HasLoggedIn As Boolean
Dim rs2 As ADODB.Recordset
Dim writeOneOption As Object
Dim MemberOpen() As Object
Dim loginURL As String
Dim headAdd As String
%>
Compiler Error Message: BC30002: Type 'ADODB.Command' is not defined
Thanks In Advance
Narendra
|
|
|
|
|
in asp .net there will be two files of a particular page. one is aspx i.e. design that contains html and asp tags will be there and another is aspx.vb or aspx.cs (code behind file) depending upon your language selection.
you have to declare all your variables and objects in that code behind file that contains the logic of your page and it also handles events of the controls.
you want to access adodb that you need to add reference of it. right click on solution explorer and click on add references and select your particular reference now you need to imports (vb) or using (c#) that adodb name space in your code behind file and you can access all its classes.
-- modified at 9:22 Friday 29th June, 2007
|
|
|
|
|
divyesh1432 wrote: you have to declare all your variables and objects in that code behind file that contains the logic of your page and it also handles events of the controls.
Not true. The code-behind file is not required. Using tag < you can have your code in the presentation file. Not recommended, but still possible.
<div class="ForumSig"><hr>only two letters away from being an asset</div>
|
|
|
|
|
Hi,
I am very much thankful to your reply.
We have included ADODB to the reference but still it is Showing same Error.
Below is Our Migrated code:
<%@ Import namespace="ADODB" %>
<%@ page language="VB" aspcompat="true"%>
<%
Dim gi_LoginOptional As Object
Dim displayHeader As Object
Dim cmd As ADODB.Command
Dim con4 As ADODB.Connection
Dim rs1 As ADODB.Recordset
Dim g_IsLoggedIn As Boolean
Dim displayFooter() As Object
Dim i As Integer
Dim g_HasLoggedIn As Boolean
Dim rs2 As ADODB.Recordset
Dim writeOneOption As Object
Dim MemberOpen() As Object
Dim loginURL As String
Dim headAdd As String
%>
<%
'temp send everyone to homepage, per joey. -rmesard 23-apr-2007
'response.Redirect "content.asp?from=index"
'response.end
con4 = New ADODB.Connection
rs1 = New ADODB.Recordset
rs2 = New ADODB.Recordset
cmd = New ADODB.Command
%>
It si Showing the Error As
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'ADODB.Command' is not defined.
Source Error:
Line 9: Dim gi_LoginOptional As Object
Line 10: Dim displayHeader As Object
Line 11: Dim cmd As ADODB.Command
Line 12: Dim con4 As ADODB.Connection
Line 13: Dim rs1 As ADODB.Recordset
Source File: http://localhost/wlb2003/index.aspx Line: 11
Thanks and Regards
Narendra
|
|
|
|
|
Hi,
I am very much thankful to your reply.
We have included ADODB to the reference but still it is Showing same Error.
Below is Our Migrated code:
<%@ Import namespace="ADODB" %>
<%@ page language="VB" aspcompat="true"%>
<%
Dim gi_LoginOptional As Object
Dim displayHeader As Object
Dim cmd As ADODB.Command
Dim con4 As ADODB.Connection
Dim rs1 As ADODB.Recordset
Dim g_IsLoggedIn As Boolean
Dim displayFooter() As Object
Dim i As Integer
Dim g_HasLoggedIn As Boolean
Dim rs2 As ADODB.Recordset
Dim writeOneOption As Object
Dim MemberOpen() As Object
Dim loginURL As String
Dim headAdd As String
%>
<%
'temp send everyone to homepage, per joey. -rmesard 23-apr-2007
'response.Redirect "content.asp?from=index"
'response.end
con4 = New ADODB.Connection
rs1 = New ADODB.Recordset
rs2 = New ADODB.Recordset
cmd = New ADODB.Command
%>
It si Showing the Error As
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'ADODB.Command' is not defined.
Source Error:
Line 9: Dim gi_LoginOptional As Object
Line 10: Dim displayHeader As Object
Line 11: Dim cmd As ADODB.Command
Line 12: Dim con4 As ADODB.Connection
Line 13: Dim rs1 As ADODB.Recordset
Source File: http://localhost/wlb2003/index.aspx Line: 11
Thanks and Regards
Narendra
|
|
|
|
|
Because of the many differences between classic ASP and ASP.NET the general advise is to not migrate an application. You will get better results by redesigning and recoding. Sounds like a harsh method, yet the benefits of better code, increased performance and greater extensibility is worth it.
IMO also there is no point in going from ASP to ASP.NET 1.x, you might as well jump to 2.0
only two letters away from being an asset
|
|
|
|
|
Hi,
We have included adodb reference in asp.net 1.1 but still we are having the same problem.what to do.Thanks for your help.
Thanks & regards
Narendra
|
|
|
|
|
Read my message, don't migrate.
only two letters away from being an asset
|
|
|
|
|
Narendra Mohan wrote: <%
Dim gi_LoginOptional As Object
Dim displayHeader As Object
Dim cmd As ADODB.Command
Dim con4 As ADODB.Connection
Dim rs1 As ADODB.Recordset
Dim g_IsLoggedIn As Boolean
Dim displayFooter() As Object
Dim i As Integer
Dim g_HasLoggedIn As Boolean
Dim rs2 As ADODB.Recordset
Dim writeOneOption As Object
Dim MemberOpen() As Object
Dim loginURL As String
Dim headAdd As String
%>
Your going to want to make at the very least a simple connection class and do away with any includes for connection objects.
Some of the above code (the ones I can make out) would then be re-written something like this:
Dim cmd As New SqlCommand
Dim con4 As New SqlConnection
Dim rs1 As SqlDataReader
Assuming your using MSSQL for a DB, otherwise you will need to use Oracle, MySql or OLEDB for Access.
You don't need to write a connection class, you could write it out manually each time, but this is not a good practice and will make managing things more complex in the log run.
Hope this helps.
|
|
|
|
|
hello,
i have a problem that i am using a particular font and it is not installed on client's machine.
does client must installed particular font? or there is another solution.
thank you
|
|
|
|
|
You have two options:
1.) Make the text you are displaying an image (this is a problem if you are showing dynamic text).
2.) Install the font on the clients machine.
|
|
|
|
|
Hi all,
Are all objects created in asp .net transient or persistant???
ie if i write SqlConnection sqlConnection=new SqlConnection(.....) 100 times, does this imply that 100 different objects are created or a single object is overwritten???
|
|
|
|
|
if you repeat this statement sam werch wrote: SqlConnection sqlConnection=new SqlConnection(.....) for 100 times the code will not compile
if you write
SqlConnection sqlConnection = new SqlConnection(.....);
sqlConnection = new SqlConnection(.....);
sqlConnection = new SqlConnection(.....);
sqlConnection = new SqlConnection(.....);
for 100 times
it will create only one object
but the memory will be refred 100 times
and 100 times insatcne will be generated
and its really a coding HORRoR
Regards,
Sylvester G
|
|
|
|
|
Suppose i close the connections every time i instantite it, will it dispose off the connection?
|
|
|
|
|
|
Thanks 4 giving ur precious time
|
|
|
|