|
I want to open image in my application and store the path in button next and back to display image?
................
|
|
|
|
|
|
Is that a question or a statement?
|
|
|
|
|
It is question
................
|
|
|
|
|
help me i am a new Programmer
plz tell how to genarate a new XML file using VB.
malayasen
|
|
|
|
|
|
Help me please
i am new programmer
i have two problem
1. How to Get all form name in project ? (Code)
2. How to Create Data Provider Class to Cast type from Sql Or Oracle Type
Best Regard
Thank you
SiamBrain.NET
Hello
|
|
|
|
|
Hi all,
im workin on a sql statement to validate a login transaction.
how am i goin to have the value of a textbox in my sql statement?
im trying this code.
com_signon = New OleDbCommand("select * from tbl_access where user_id = !txt_username", con_db_ssr)
but it doesn't work...
-::maximus::-
|
|
|
|
|
Hi,
You can use like this:
"select * from tbl_access where user_id ='" & TextBox3.Text "'"
Hope this will help you.
Best Regards,
Apurva Kaushal
|
|
|
|
|
com_signon = New OleDbCommand("select * from tbl_access where user_id ='"& txt_username.Text &"'", con_db_ssr)
|
|
|
|
|
tnx guys
-::maximus::-
|
|
|
|
|
You should look into using a parameterized query instead.
Both examples that you got are totally open to SQL injection attacks.
---
b { font-weight: normal; }
|
|
|
|
|
Hi All,
I have Data Grid on aspx page. One of the column in that grid is a Template Column. I have added a Drop down list in EditItemTemplate. If I add this in ItemTemplate I am able to bind the DropDownList in code behind by making a reference using the below code:
e.Item.Cells(4).FindControl("ddlCountry")
But when this control is present in EditItemTemplate I am not able to get the reference to the above control. Can anybody suggest me how to go ahead with this situation?
Thank you,
Krishnaraj
|
|
|
|
|
Hi,
You can use Onitemdatabound event of the datagrid to do this. What you need to do is in that event you just check for the edititemtype and then bind the dropdownlist.
Hope this will help you.
BTW This you better post in asp.net forum.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Apurva,
Thank you for your kind response,
The code I metioned earlier is inside the Onitemdatabound and before binding I am checking the ‘ListItemType.EditItem’. I am getting problem when I try to get the reference to the control using the below code inside he event handler. Please check this below code
Dim cmb As New DropDownList
If e.Item.ItemType = ListItemType.EditItem Then
cmb = e.Item.Cells(4).FindControl("ddlCountry")
End If
In the above code ‘ddlCountry’ is the dropdown list control id. If I add this control in the Item Template instead of Edit item template I get reference to it.
Krishnaraj
|
|
|
|
|
Hi,
Directly use e.Item.FindControl("ddlCountry").
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
Thanks a Lot… its working now…
Regards,
Krishnaraj
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I just want to connect with an microsoft access database in a remote mechine.
At first i try to connect with a database in local mechine.
Dim Cn As OleDbConnection
Dim strConString As String
strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\localhost\D:\News\News\bin\News.mdb"
Cn = New OleDbConnection(strConString)
Cn.Open()
i got an error : '\\localhost\D:\News\News\bin\News.mdb' is not a valid path.
Please help me.
Thanks
Thomas
|
|
|
|
|
thomas_joyee wrote: i got an error : '\\localhost\D:\News\News\bin\News.mdb' is not a valid path.
Yea, right.
So what have you done to attempt to solve this problem? Tell us so we can help you.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Sir,
i tried following options.
strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\127.0.0.1\D:\News\News\bin\News.mdb"
strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\computername\D:\News\News\bin\News.mdb".
But these are not working.
Thanks for your reply
Thomas
|
|
|
|
|
You are first trying to connect to an MDB on your local machine right?
If so, the Data Source parameter is malformed for a local path. That's what the error message has told you already.
Try copying the path you specify into the address box of Windows Explorer and see what it tells you. Now modify it until it works and then you should be able to use that in your connect string.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Hi,
with windows explorer i found this code will work.
strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\127.0.0.1\D\News\News\bin\News.mdb"
Thanks for your valuable help.
Thomas
|
|
|
|
|
You are very welcome.
Another happy customer
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Hi I am trying to place placeholder template within a datalist for some reason i am getting this error that says object reference not set to instance of an object the
aspx page is:
<asp:datalist id="dlScHead" runat="server" showfooter="False" showheader="False" cellspacing="0"
="" cellpadding="0" width="100%">
<itemtemplate>
<%# ctype(DataBinder.Eval(Container.DataItem,"ScoreCardID"),string) %>
<%# ctype(DataBinder.Eval(Container.DataItem,"scorecarddesc"),string) %>
<%# ctype(DataBinder.Eval(Container.DataItem,"BusinessGoal"),string) %>
|
<asp:datalist id="dlScChart" width="100%" datasource="<%# (GetRecords(Cstr(DataBinder.Eval(Container.DataItem, "ScoreCardId")))) %>" runat="server">
<itemstyle verticalalign="Top" backcolor="#EEEEEE">
<itemtemplate>
<asp:placeholder id="Placeholder1" runat="server">
|
<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter1").tostring()) %>
<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter2").tostring()) %>
<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter3").tostring()) %>
<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter4").tostring()) %>
|
================================================
and code behind
--------------------
in page load event i am doing
dlScHead.DataSource = GetRecords(Nothing)
dlScHead.DataBind()
and in function getRecords i am doing
Function GetRecords(ByVal scID As String) As SqlDataReader
Dim bizProgName As String = Request.QueryString("bizProgId")
Dim CommandText As String
Try
objConn = New SqlConnection(dbPath)
objConn.Open()
If scID = Nothing Then
Dim da As New SqlDataAdapter
da.SelectCommand = New SqlCommand
da.SelectCommand.Connection = objConn
da.SelectCommand.CommandText = "select scorecardId,bizProgId,scorecarddesc,businessgoal,strategy,quarter1,quarter2,quarter3,quarter4 from textData where bizProgID='" & Request.QueryString("bizProgId") & "'"
dr = da.SelectCommand.ExecuteReader(CommandBehavior.CloseConnection)
If dr.HasRows Then
'lblError.Text = ""
Else
'lblError.Text = "No records returned"
End If
GetRecords = dr
Else
cmd = New SqlCommand("select distinct measure_id from measuredata where scoreCardId = '" & scID & "'", objConn)
Dim da As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dtid As New DataTable("measureid")
da.fill(dtid)
'select all columns with id
Dim cmd1 As SqlCommand = New SqlCommand("select * from measuredata where scorecardid = '" & scID & "'", objConn)
Dim da1 As SqlDataAdapter = New SqlDataAdapter(cmd1)
Dim dt As New DataTable("measuresource")
da1.Fill(dt)
Dim datarow As DataRow
For Each datarow In dtid.Rows
Dim chart As New DataGrid
Dim myview As New DataView(dt)
' dim chart as new mycos.mycoschartweb
myview.RowFilter = String.Format("measure_id='{0}'", datarow.Item("measure_id"))
chart.DataSource = myview
chart.DataBind()
Dim i As Integer
For i = 0 To dlScChart.Items.Count - 1
dlScChart.Items(i).FindControl("placeholder1").Controls.Add(chart)
Next
Next datarow
' GetRecords = PlaceHolder1.FindControl("placeholder1")
End If
Catch ex As Exception
Response.Write("error on child-- here" + ex.ToString + " ")
Finally
End Try
End Function
i am getting error in
dlScChart.Items(i).FindControl("placeholder1").Controls.Add(chart)
please help thanks
|
|
|
|