|
Taliesin99 wrote: This will change.
What will change?
Taliesin99 wrote: I need to understand how the ELLB deals with multiple configuration files.
Does it? I thought each application supplies it's own configuration?
|
|
|
|
|
Sorry for my lack of clarity.
There are several projects withing this solution. Many of them provide their own app.config or web.config files. At the moment, each of the categories in all of configuration files ultimately point to the same flat file, trace.log. So all the entries are written to the same file, at least the same file on a particular server. As requirements are changing, different projects need to point to files named something other than trace.log. There will be multiple log files in use. Also, there will be situations where different projects will still need to write to the same log file. Right now, that means managing multiple configuration files, which I would like to avoid if possible.
There are also projects in the solution which make calls to logger.write, but have no config file defined within that project. All the projects have a reference to what I assume are the same binaries for the Application Logging Block (we are not extending that code in any way). The logging in these projects appears to be working, so my assumption is that they are finding the categories defined in some other project and making to the log file. This may be an incorrect assumption on my part.
I guess what I am really looking for is a way to manage the logging across multiple projects (assemblies) within the same solution using as few configuration files as possible, ideally one. This may not be possible. But I have not yet found any documentation that discusses this situation.
|
|
|
|
|
Taliesin99 wrote: I guess what I am really looking for is a way to manage the logging across multiple projects (assemblies) within the same solution using as few configuration files as possible, ideally one.
I’m not an expert on the logging block but it wouldn’t seem likely that any sort of organization like you describe is part of it. There would be far too many variables to account for in a generalized library. If you want some sort of central management of logging configuration across your suite of applications you will probably have to develop that yourself.
I don’t have your complete requirements (and I don’t want them), however one thing you might consider is that a build system could potentially allow you to develop a centralized configuration that will automate the distribution of information into the project files. I’m pretty sure you could use ANT to accomplish that so I imagine MS Build might work as well.
|
|
|
|
|
How do I go about using filtering on the built in trace listeners, such as System.Diagnostics.DefaultTraceListener and System.Diagnostics.TextWriterTraceListener ?
I don't want to have to override write methods and explicitly check the filtering, but I can find no way to attach a level to trace information?
|
|
|
|
|
I'm trying to save a unicode utf8 string --> "سلام" in a feature of a featureclass, but it is saved like "????".as ArcMap support different encodin and also Farsi that I'm working with, It should be possible through my program.but I didn't find any way yet.anybody knows about this?
<br />
<br />
feature = fc.CreateFeature();<br />
feature.Shape = point;<br />
feature.set_Value(feature.Fields.FindField("Name"), o.Name);<br />
feature.Store();<br />
fc is an IFeatureClass, feature is an IFeature and o.Name is a unicode.utf8 string.in watch window:
feature.get_value(feature.Fields.FindField("Name"))--> is OK
but
fc.GetFeature(1).Get_Value(feature.Fields.FindField("Name")) --> is "????"
and this is what is saved. What should I do?
|
|
|
|
|
Cross posting[^] is considered rude.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
i dont know
poda fool
|
|
|
|
|
hi,
This code will export the datalist into Excel with exact text,position and style in asp.net.
Please include System.IO at the top of the file.
string filename = "BacklogData.xls";
Response.Cache.SetExpires(DateTime.Now.AddSeconds(1));
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = Encoding.Unicode;
Response.BinaryWrite(Encoding.Unicode.GetPreamble());
Response.Charset = "";
this.EnableViewState = false;
Response.Write("<html xmlns:x=\"urn:schemas-microsoft-com:office:excel\">");
Response.Write("\r\n");
Response.Write("<style> .text " + "\r\n" + " {mso-style-parent:style0;mso-number-format:\""+@"\@"+"\""+";} " + "\r\n" + "</style>");
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
DataList.RenderControl(hw);
Response.AppendHeader("content-disposition","attachment;filename="+filename);
Response.Write(tw.ToString());
Response.End();
Happy Coding !!!!
Regards
Arun Kumar
H
|
|
|
|
|
this will not work it will give you error like while working with master page
'ctl00_CntFormContents_DataList1_ctl01_gvTopFiveMasterIntroducer' of type 'GridView' must be placed inside a form tag with runat=server'
any suggetion
|
|
|
|
|
Thank you so much. Your code help me. Wish you happy for whole your life.
|
|
|
|
|
Hi,
I have a windows (System.Windows.Window) that shows a question for the user. This window is not opened by the GUI thread. I want this window to always be on top, how can I do this?
Regards
Marc
|
|
|
|
|
Hi,
have you tried Form.TopMost ?
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
|
Hello there!
My code is highlighted below.I have five tabpages(two is shown here!) on a form called vwpatient that runs each time a tabpage is selected.The code below works but my problem is this: there is a textbox called sachPatient.patID from another form called sachPatient, the code pulls data from the database on clicking one or two pages, but if more than two is clicked, an exception fires saying "Make sure you have not released a resource before attempting to use it". I have tried endlessly to fix this problem to no avail. And am still trying!!.
I would appreciate if someone can help me.
Thanks in advance!!!
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
For Each tabcont As Control In Me.Controls
If TypeOf tabcont Is TabControl Then
For Each tp As Control In tabcont.Controls
If TypeOf tp Is TabPage Then
Select Case tp.Name
Case "vwProfTabPg"
Try
LoadData()
' Configure and execute the command.
cmd = New System.Data.SqlClient.SqlCommand("SELECT * FROM Patient_profile where patient_Id = @Pat_ID")
cmd.Connection = cn
Dim paraPatId As SqlParameter = cmd.Parameters.Add("@Pat_ID", sachPatient.patID.Text)
' Load the DataTable.
datadapt = New System.Data.SqlClient.SqlDataAdapter(cmd)
datadapt.Fill(ds)
ds.Tables.Add(dt)
' Bind the DataGrid.
vwProfDG.DataSource = ds.Tables(0)
vwProfDG.Visible = True
Catch ex As SqlException
MsgBox(ex.Message.ToString())
Finally
cn.Close()
End Try
Case "vwLabTabPg"
Try
LoadData()
' Configure and execute the command.
cmd = New System.Data.SqlClient.SqlCommand("SELECT * FROM lab where patient_Id = @PatLa_ID")
cmd.Connection = cn
Dim paraPatId As SqlParameter = cmd.Parameters.Add("@PatLa_ID", sachPatient.patID.Text)
' Load the DataTable.
datadapt = New System.Data.SqlClient.SqlDataAdapter(cmd)
datadapt.Fill(ds)
ds.Tables.Add(dt)
' Bind the DataGrid.
vwLabDatGrid.DataSource = ds.Tables(0)
vwLabDatGrid.Visible = True
Catch ex As SqlException
MsgBox(ex.Message.ToString())
Finally
cn.Close()
End Try
End Select
End If
Next
End If
Next
|
|
|
|
|
First of all, you can replace the loop through the TabPages at the start with a simple TabControl1.SelectedTab.Name and do a Select Case on that. Second, please post your code in <pre> tags. Lastly, which line does the error occur on?
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Thanks a lot Computafreak for ur help.
Here is still the problem:
My code is highlighted below.I have five tabpages(two is shown here!) on a form called vwpatient that runs each time a tabpage is selected.The code below works but my problem is this: there is a textbox called sachPatient.patID from another form called sachPatient, the code pulls data from the database on clicking one or two pages, but if more than two is clicked, an exception fires saying "Make sure you have not released a resource before attempting to use it". I have tried endlessly to fix this problem to no avail. And am still trying!!.
I would appreciate if someone can help me.
Thanks in advance!!!
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
Select Case tabControl1.SelectedIndex
Case 0
Try
LoadData()
' Configure and execute the command.
cmd = New System.Data.SqlClient.SqlCommand("SELECT * FROM Patient_profile where patient_Id = @Pat_ID")
cmd.Connection = cn
Dim paraPatId As SqlParameter = cmd.Parameters.Add("@Pat_ID", sachPatient.patID.Text)
' Load the DataTable.
datadapt = New System.Data.SqlClient.SqlDataAdapter(cmd)
datadapt.Fill(ds)
ds.Tables.Add(dt)
' Bind the DataGrid.
vwProfDG.DataSource = ds.Tables(0)
vwProfDG.Visible = True
Catch ex As SqlException
MsgBox(ex.Message.ToString())
Finally
cn.Close()
End Try
Case 1
Try
LoadData()
' Configure and execute the command.
cmd = New System.Data.SqlClient.SqlCommand("SELECT * FROM lab where patient_Id = @PatLa_ID")
cmd.Connection = cn
Dim paraPatId As SqlParameter = cmd.Parameters.Add("@PatLa_ID", sachPatient.patID.Text)
' Load the DataTable.
datadapt = New System.Data.SqlClient.SqlDataAdapter(cmd)
datadapt.Fill(ds)
ds.Tables.Add(dt)
' Bind the DataGrid.
vwLabDatGrid.DataSource = ds.Tables(0)
vwLabDatGrid.Visible = True
Catch ex As SqlException
MsgBox(ex.Message.ToString())
Finally
cn.Close()
End Try
End Select
|
|
|
|
|
Hi,
if
(1) you watch all the exception information using Exception.ToString()
(2) you told your IDE to always show line numbers in edit windows
then it is easy to figure out which line causes the problem.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
post by Luc Pattyn:
2) you told your IDE to always show line numbers in edit windows
how do i do that?
And am sory if my codes appear naive, am not experienced in vb.net.
Thank for your help.
|
|
|
|
|
nedusmile wrote: told your IDE to always show line numbers in edit windows
how do i do that?
depends on the IDE.
On some versions of Visual Studio, it is under menu Tools/Options/TextEditor/AllLanguages: display line numbers.
nedusmile wrote: sory if my codes appear naive
I'm not making such comment, I try to make you help yourself in the first place. Code quality comes with dedication and experience.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Somewhere in this mess you've released a resource (i.e. Disposed of it) - my guess would be that it's the connection that's causing you problems.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Don't post VB trash outside the VB forums and then vote down someone like Pete when he provides you with freely given advice.
|
|
|
|
|
Hi,
I have developed a code to create a ms-access table through VB.NET as mentioned below.
ADOXtable = New ADOX.Table
ADOXtable.Name = "ACN_CHARX_INSTANCE"
ADOXtable.Columns.Append("LOGICAL_DB_NAME", ADOX.DataTypeEnum.adVarWChar, 32)
ADOXtable.Columns.Append("DIM_NAME", ADOX.DataTypeEnum.adVarWChar, 32)
ADOXtable.Columns.Append("CHARX_NAME", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("CHARX_TABLE", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("CHARX_VALUE_COL", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("VALUES_UNIQUE", ADOX.DataTypeEnum.adInteger)
ADOXtable.Columns.Append("CHARX_ORDER_COL", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("CHARX_ORDER", ADOX.DataTypeEnum.adInteger)
ADOXtable.Columns.Append("CHARX_NUMERIC_COL", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("BITMAP_COL", ADOX.DataTypeEnum.adVarWChar, 128)
cat.Tables.Append(ADOXtable)
Now i want to set primary key constraints for this table through coding. Please share your ideas...
Thanks,
Sivakumar.M.
|
|
|
|
|
|
Hi,
How many primary key constraints can we have in a table of ms-access? Any other constraints available in ms-access other than primary key?
Please share your ideas...
Thanks,
Sivakumar.M.
|
|
|
|
|
This question has nothing to do with .NET. Please ask in the Database forum.
|
|
|
|