|
Hi,
means you want to save records from gridview to database ?
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
yes, I want to save records gridview to database
|
|
|
|
|
Gagan Deep Garg wrote: yes, I want to save records gridview to database
Iterate through each record in gridview and update database.
|
|
|
|
|
I want to save temporary gridview to database.
|
|
|
|
|
Gagan Deep Garg wrote: I want to save temporary gridview to database.
That is what i said. You want to save the Gridview contents right ? I reiterate, you need to put a loop that goes through all the rows, form an insert statement and insert. These are very basic things, you consider buying a good ASP.NET book.
|
|
|
|
|
Hi I am experimenting with VBScript and SQL and am unsure if the following code will actually work. I do not have access to IIS at present so I am unable to test it. I would be greatfull if anyone could just take a brief look at the code to see if the syntax is correct. Thanks
<%@Language = "VBScript" %>
<%Option Explicit%>
<!--#include virtual="/advobs.inc"-->
<%
Dim newDate
Dim newTime
Dim newMessage
Dim objConn
Dim sqlInsert
Dim objRecordSet
Set objConn = Server.CreatObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};"&_"DBQ=C:/inetpub/wwwroot/feedBack.mdb"
objConn.Open
newDate = Date()
newTime = Time()
newMessage = request.form("strMessage")
if newMessage <> "" then
sqlInsert="INSERT INTO tblMessages(date,time,message) VALUES(newDate,newTime,newMessage)"
end if
Set objRecordSet=Server.CreateObject("ADODB.Recordset")
objRecordSet.Open "tblMessages", objConn,,,adCmdTable
Do while Not objRecordSet.EOF
Response.Write"<B>" & objRs ("time") & "</B><BR>"
Response.Write objRs("date") & "<BR>"
Response.Write objRs ("message") & "<BR>"
Response.Write "<p><hr></p>"
objRecordSet.MoveNext
Loop
objRecordSet.Close
Set objRecordSet = Nothing
objConn.Close
Set objConn = Nothing.
%>
|
|
|
|
|
I guess Web Development would be the right forum to this question. This is ASP.NET forum. I don't think someone here can figure out the error in your code.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Ok thanks i will post it there then
|
|
|
|
|
Hello.
I want to retreive the structure of database...
Rquirement is : when i select the table name, it should give the details of tables like the columns it contains, rows etc in which database it is present et c
Aswini
|
|
|
|
|
SQL ~
Execute this T-SQL to get the columns of your table..
SELECT column_name FROM information_schema.columns<br />
WHERE table_name = @table_name<br />
AND table_schema = @owner_name<br />
ORDER BY ordinal_position
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
there are few system stored procs that returns the inforamtion about the database objects. take a look at those.
sp_databases <br />
sp_tables <br />
sp_columns
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
HI all
I am trying to create a autocomplete textbox i used this code
The code in c# it is working fine but when i convert to VB it is giving error .
on page load()
" acSearch.OnAutoComplete = New Autocomplete.AutoCompleteHandler(Me.GetSearchData)"
can any one tell me what i am missing in the code.
MY CODE
--------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AjaxPro.Utility.RegisterTypeForAjax(GetType(WebForm1))
acSearch.PageType = Me.[GetType]().BaseType
acSearch.OnAutoComplete = New Autocomplete.AutoCompleteHandler(Me.GetSearchData)
End Sub
<ajaxpro.ajaxmethod()> _
Public Function GetSearchData(ByVal s As String) As System.Data.DataTable
Dim conn As New SqlConnection("server=DSS1;uid=sa;pwd=sa;database=Northwind")
Dim cmd As New SqlCommand("SELECT FirstName FROM Employees WHERE FirstName LIKE @FirstName + '%'", conn)
cmd.Parameters.Add("@FirstName", s)
Dim da As New SqlDataAdapter
Dim ds As New DataSet
da.SelectCommand = cmd
da.Fill(ds, "Employee")
Return ds.Tables("Employee")
End Function
-----------------
Keerthi
|
|
|
|
|
What error are you getting?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Thx For reply
The Error is
C:\Inetpub\wwwroot\20-3-2006\TextBoxAutoCompletion\WebForm1.aspx.vb(31): 'WebCustomControl.Lab.Autocomplete.AutoCompleteHandler' is a delegate type. Delegate construction permits only a single AddressOf expression as an argument list. Often an AddressOf expression can be used instead of a delegate construction.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AjaxPro.Utility.RegisterTypeForAjax(GetType(WebForm1))
acSearch.PageType = Me.[GetType]().BaseType
acSearch.OnAutoComplete = New Autocomplete.AutoCompleteHandler(Me.GetSearchData)
End Sub
Keerthi
|
|
|
|
|
kirthikirthi wrote: acSearch.OnAutoComplete = New Autocomplete.AutoCompleteHandler(Me.GetSearchData)
acSearch.OnAutoComplete = New Autocomplete.AutoCompleteHandler(AddressOf Me.GetSearchData)
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Thx Michael Sync
It working
Keerthi
|
|
|
|
|
iam using this method for(Response.AppendHeader("content-disposition", _
"attachment; filename=" & name))file downloading ...its working fine with all types file extensions...the problem is that now i installed
DAP download for fast accessing ..now the problem is that when i down load the rtf file using this method it is not getting the rtf file ..instead it is gettind default.aspx file to down load how this problem will be solved
|
|
|
|
|
Can any one tell me how to solve this problem?
Server Error in '/DataEditor' Application.
--------------------------------------------------------------------------------
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.
Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to 'D:\inetpub\wwwroot\DataEditor\Reference.aspx'.
|
|
|
|
|
Hi,
try to give rights to the director named DataEditor..
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
I have given begindcode
while(dr10.Read())
{
Response.Write("<img src=~\"uploads\" width=\"39\" border=\"1\" height=\"40\">");
}
HTML CODE
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="lbl4" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"picture") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
Its not retrieving
krishna
|
|
|
|
|
|
Have a look at this One[^], Two[^].
What exactly is the problem?
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Please understand, i hope u people will help me thats y iam keep sending dont mistake me r to get angry...
The producer wht u had send all storing link to the db, but i have stored a image file name as (9.jpg) no image was there, image was in separate folder having this image file 9.jpg.
In out put its receiving like 9.jpg( no image ), so how to link with that folder to retrieve the image.
Advance Thanx,
krishna
|
|
|
|
|
Hi,
as you have just store image name in your database and your inmage is in another folder of your application.
So, first you have to get image name from database and then you have to concat the string of folder path of that image with file name, then you will get image.
see this below code.
your page is in forms directory and yr image is in images directory.
So now on page.
String path = Server.MapPath("../Images/" + filenameFromDatabase);
So you will get ......../Images/image1.jpg path. Now open the file.
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
Which one is this ' filenameFromDatabase' means ?
krishna
|
|
|
|