|
Thank You Very Much -Malli...!
|
|
|
|
|
I want
Write client server software when you query server about data from clien then what is connected commands? What do you need to install to executing insert, delete commands, ...?
i am pham quang dan
|
|
|
|
|
Are you using VB6 or .NET?
|
|
|
|
|
Hai you need to reterive a data from server OR Client sends the information to server?
|
|
|
|
|
How to manipulate the listbox and its components?
examples pls...
xxxheroxxx
|
|
|
|
|
You'll have to be a lot more specific than that. We're not teching classes on how to use the basic controls of VB6. What are you having a problem with?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
How do i showing text "Processing" in statusbar while the aplication saving/processing query to the sql database, and when the process is done the text becoming "DONE"
Please advice,
Regards
Abbas
|
|
|
|
|
Depending on how you've written your app,
Me.Text = "Processing..."
' Process pending messages, like repainting the window...
Application.DoEvents()
.
. ' Do you SQL processing...
.
Me.Text = "what it was before..."
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I am working on a small project with datagrids and datasets, I want to give the user an option of saving this datasets data to xls file (the data is very small not big data which excel can take it) . I tried using different ways still not able to do it.
Kindly suggest me or any idea How to convert or export this excel format.
Thanking you in advance.
-- modified at 21:30 Monday 17th July, 2006
|
|
|
|
|
I have used the Infragistic .NET Advantage suite in the past which has a control to output data in their Grid control to an Excel file. If you are using Excel 2003, you could just save the DataSet to an XML file, which Excel will happily read. Another way, write your data to a text file usign html tags for formatting and save the file as a .xls file. The advantage here is that you can incorporate forumla into your cells. For Example
<code>
<table>
<tr>
<td><b>Product</b></td>
<td><b>Price</b></td></code>
</tr>
<tr>
<td>Baked Beans</td>
<td>1.20</td>
</tr>
<tr>
<td>Musty Peas</td>
<td>0.79</td>
</tr>
<tr>
<td><b>Total</b></td>
<td><b>=SUM(B1:B2)</b></td>
</tr>
</table>
Steve Jowett
|
|
|
|
|
thanks alot for the help,
Can you kindly give an idea how to write to xml file, and if I am writing with HTML, do I have to write the details too as I am using in one computer ms office 2000 and other computer 2003. Sorry for my ignorance I really don't have any idea about it, if you can give me an idea I can learn more about it and will just use it accordingly.
Thanking you again
|
|
|
|
|
RegistryPermission
can someone describe me how this class wokrs for giving permission to registry paths? for example i gave Read Access Permission to HKEY_Currentuser\Myapp (MyApp is a personal key) . and then wrote a code like below:
my.computer.registry.setvalue(...
but still i have all access permission to this path.
i ran this code from same and different assembly but both can change the variables values in that path. what is the solution to set permissions for specific paths in registry during runnig an application?
|
|
|
|
|
I think you're misunderstanding what the RegistryPermission class does. It does not control access to the Registry key, but is a Permission that your code aquires so it can access the registry.
For example, about the best I can explain it is if your code was running from a network share, it wouldn't normally have Permission to Read/Write the registry. The use of this class by your code "asks" the CLR for permission to access the specified registry key. If Code Access Security is setup properly, your code can get the requested permission, if available to it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
Almost all of my .NET coding has been ASP.NET so I haven't used a timer control much at all. Now I'm coding an application in which I have implemented a timer control that ticks every 1 second. It goes something like this:
Timer.tick fires
if it is the top of the hour,
do some stuff that takes 30 seconds or so
end if
My question is, what happens to the timer ticks while it does "some stuff for 30 seconds or so" ?
"Half this game is ninety percent mental." - Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
M y and h don't work so well due to m addiction to caffeine and m in abilit to to set a cup down uprigt.
|
|
|
|
|
The Timer keeps running, piling up 30 seconds worth of Tick events!
In your Tick event handler, just disable the timer. Then at the end of the handler, re-enable it.
Private Sub Tiemr1_Tick(blah, blah) Handles Timer1.Tick
Timer1.Enabled = False
.
. do your processing here...
.
Timer1.Enabled = True
End Sub
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 18:19 Monday 17th July, 2006
|
|
|
|
|
Thanks Dave, it makes sense to disable the timer while I'm doing work. Here is what I've got:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Now.TimeOfDay.Minutes = 0 Then
'Do work that takes 30 seconds
End If
End If
The work only happens twice since it takes 30 seconds. So the ticks sort of build up while I'm doing work and then flood on through after the work is done I suppose. Otherwise the work would run 60 times in the minute at the top of the hour, correct? Now.TimeOfDay.Minutes only gets evaluated later on (after work is done) it seems, and not when the tick actually occurs. That is what it seems like.
At any rate, I will my code change to:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Now.TimeOfDay.Minutes = 0 Then
Timer1.Enabled = False
'Do work that takes 30 seconds
Timer1.Enabled = True
End If
End If
"Half this game is ninety percent mental." - Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
M y and h don't work so well due to m addiction to caffeine and m in abilit to to set a cup down uprigt.
|
|
|
|
|
Hello!
It is an asp access based web site. The entries in the asp pages have entered in Turkish and there is no problem displaying the turkish characters in asp pages. However, when I record the entry in to access database file and then re-open the file, I have seen different ascII characters instead of Turkish characters. I have hosted the web site in the states. Can localization cause such problem by the server?
Is there a way to see exact turkish characters in the access database file.
Thank You
|
|
|
|
|
okay, I'm a baby programmer, so don't laugh if this question is too obvious, but I've been stuck on this for hours now
Very simple assignment - select data from an access data base
using a data adapter and use the fill method to populate a data set
I've looked at several examples that I've found on line and don't see what's wrong with my code. I always get a message on the adapter.fill line saying 'no value passed for one or more parameters'
I see examples that dont just say adapter.fill(datasetname)
and others that others that give a name for the name for the results within the data set, but I can't get either of these to work
heres the latest attempt
Thanks
Protected Const CANDIDATESRESULTS As String = "Results"
Protected connection As OleDbConnection = New OleDbConnection(connectionString)
Public Sub OneCandidate(ByVal CandID As String)
Dim candidateInfo As String = "SELECT * FROM CandidatesResults where CandidatesReulsts.CandidateID = '" & CandID & "'"
Dim candAdapter As OleDbDataAdapter = New OleDbDataAdapter(candidateInfo, connection)
candAdapter.SelectCommand = New OleDbCommand(candidateInfo, connection)
candAdapter.Fill(candData, CANDIDATESRESULTS)
DG.DataSource = candData
DG.DataBind()
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=..\..\SampleDataBase.notadb"
Dim candData As DataSet = New DataSet
|
|
|
|
|
Your code is a little out of order... You are dim'ing your connection string and your dataset after you've already connected to the database and attempted to fill your dataset. Try this:
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=..\..\SampleDataBase.notadb"
Dim candData As DataSet = New DataSet
Dim con As OleDbConnection = New OleDbConnection(connectionString)
Public Sub OneCandidate(ByVal CandID As String)
Dim candidateInfo As String = "SELECT * FROM CandidatesResults where CandidatesResults.CandidateID = '" & CandID & "'"
Dim candAdapter As OleDbDataAdapter = New OleDbDataAdapter(candidateInfo, con)
candAdapter.Fill(candData, CANDIDATESRESULTS)
DG.DataSource = candData
DG.DataBind()
-- modified at 15:09 Monday 17th July, 2006
|
|
|
|
|
thanks
I can get this code to 'work' meaning not blowing up by dim the datagrid
(Dim CandDG As DataGrid = New DataGrid) inside the class that contains this public sub
the problem is the assignment calls for me to pass the data from the class to a form that calls the class. I haven't been able to get that to work
|
|
|
|
|
To pass the dataset from the class to the form you will need to modify the parameters of your method. Instead of just passing the ID string, you will also need to pass the dataset. But you will have to pass it by reference instead of by value. (passing by value will never change the original variable on the form side, by reference will)
So it will look more like this:
Public Sub MyMethodName(ByVal myID as String, ByRef myDataSet as DataSet)
That should get you started.
|
|
|
|
|
hi i m reading images from the databse and showing on picbox,so i had to make the temporary file to show pic on the picturebox thorugh Pic.image=Image.fromfile etc. it works fine.
i want to make one file for that purpose and delete when new file is readed from databse.
i m using this code for that purpose
Pic.image=null;
if(File.Exist("temp.bmp"))
File.Delete("temp.bmp");//give exception file used by process
String newf="temp.bmp"; and save the new data from database to this file and show it to the user.
but it give the exception that file is used by another process,i had clear the picbox but still gives.
how to do that Thanks in advance.
Tasleem Arif
|
|
|
|
|
|
Hi,
I faced one problam to show data in DataGrid.
I want to display one column as Top and remaining 4 columns as bottom.
like
AndhraPradesh
Hyderabad 23 23 23
Vizag 23 23 23
Karnataka
Banglore 23 23 23
Mangalor 45 45 45
TamilNadu
Chennai 23 23 23
Coimbatore 57 56 45
Please Give me solution
Thanks
Madaka
Madaka
|
|
|
|
|
Hy! I'm sorry if i can't explain my problem very well, i'm italian but i need help for a problem with vb.net program... so...
I make a web service that extract some value from a db and this result must be insered in this public structure:
<br />
Public Structure SERVS1Result<br />
Public NumeroComm As Integer<br />
Public Comm As SComm<br />
<br />
Public Structure SComm<br />
Public Nome As String<br />
Public Indirizzo As String<br />
Public Cap As String<br />
Public Comune As String<br />
Public SiglaProvincia As String<br />
Public Email As String<br />
Public telefono As String<br />
End Structure<br />
End Structure<br />
the result that i must receive for 2 record extract, is this for examp:
<soap:envelope xmlns:xsi="
"http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd="
"http://www.w3.org/2001/XMLSchema"" xmlns:soap="
"http://schemas.xmlsoap.org/soap/envelope/"">
<soap:body>
<servs1response xmlns="http://www.contoso.com/Response">
<servs1result>
<numerocomm>int
<comm>
<scomm>
<nome>string
<indirizzo>string
<cap>string
<comune>string
<siglaprovincia>string
<email>string
<telefono>string
<scomm>
<nome>string
<indirizzo>string
<cap>string
<comune>string
<siglaprovincia>string
<email>string
<telefono>string
I wrote this code:
<br />
Public Function SERVSUPP001(ByVal ist As String) As SERVS1Result()<br />
<br />
.........code..........<br />
<br />
If Not risolvi = "" Then<br />
objConn.Open()<br />
<br />
Dim Com() As SERVS1Result 'Giusto<br />
<br />
Dim pec As String<br />
Dim i As Integer = 0<br />
Dim x As Integer = 0<br />
Dim c As Integer<br />
Dim objCmd2 As New OleDbCommand("ConnectionString", objConn)<br />
Dim objReader2 As OleDbDataReader<br />
objReader2 = objCmd2.ExecuteReader<br />
<br />
While objReader2.Read<br />
pec = (objReader2.GetString(9))<br />
If pec = "Y" Then<br />
ReDim Preserve Com(i)<br />
<br />
Com(i).Comm.Nome = objReader2.GetString(2) 'Sede<br />
Com(i).Comm.Indirizzo = objReader2.GetString(4) 'indirizzo<br />
Com(i).Comm.telefono = objReader2.GetString(5) 'telefono<br />
Com(i).Comm.Email = objReader2.GetString(8) 'email<br />
Com(i).Comm.Cap = CapCom<br />
Com(i).Comm.Comune = Comune<br />
Com(i).Comm.SiglaProvincia = Provincia<br />
i = i + 1<br />
End If<br />
<br />
End While<br />
<br />
objConn.Close()<br />
objConn.Dispose()<br />
<br />
<br />
Return Com<br />
<br />
End If<br />
<br />
<br />
End Function<br />
but my result is that all the structure is replicate for each record and i need only to replicate the second structure in the first structure, this:
<br />
Public Structure SComm<br />
Public Nome As String<br />
Public Indirizzo As String<br />
Public Cap As String<br />
Public Comune As String<br />
Public SiglaProvincia As String<br />
Public Email As String<br />
Public telefono As String<br />
End Structure<br />
Can you help me please?
-- modified at 9:29 Monday 17th July, 2006
|
|
|
|