|
nilam11 wrote: can i directly update data table from execution of sql query ?
By "data table" do you mean the table in the database, or the "DataTable" object in .NET?
nilam11 wrote: or at the time of query execution can i store o/p directly into table?
What is "o/p"?
You can run any SQL through the SqlCommand object. If you want results back use ExecuteReader() . If you don't expect results back use ExecuteNonQuery()
|
|
|
|
|
hi
thanks. i want to store data table of database from query's o/p whatever will come.
Thanks
bye
|
|
|
|
|
nilam11 wrote: query's o/p
I asked this before: What is "o/p"? To me it means Original Poster. That is obviously not correct in this context.
|
|
|
|
|
i have made report of 115 query and it's working well
but the problem here is the report is tooooooo slow
what can i do please help
|
|
|
|
|
the reason its taking so long to work is that you are doing 115 INDIVIDUAL queries... thats 115 new connections to a server and 115 questions of the server.... thats a LOT of data....
Consider using a BackroundWorker of some kind, OR using a berrer query structure... thats why its taking so long.
to make it simpler, think of a query as a conversation.
You make a query to a server, you start a whole NEW converstion with it.
you ask one question ( ie select all from * where foo equals bar)
you end the conversation.
repeat 115 times.
better way to do it:
connect to server.
ask it "select from * where ( foo = bar) OR (baz = bar) OR ...."
parse that data.
end connection.
no repeat.
you only have to understand the data that you are being fed. but the only thing you have to do once is ask the query... not 115 times because you've asked it a really well refined question that can easily be answered.
Hope that helps.
----
Morgan Gangwere
Lead programmer, Unknown Software
"Pinky, are you thinking what im thinking?"
"I Dunno brain, how many licks DOES it take to get to the tootsie roll center of a tootsie pop?"
"You want me to calculate that? or should we take over the world?"
"ooh! OooooOOOooH! lets find out!"
|
|
|
|
|
thanks so much for ur help
but iam beginner so i would like to see an example because i can't get all ur reply
any way i will give one of my sql statement but u have to know that each sql statement is different from the other
here is the example
<br />
<br />
Dim s As String<br />
Call conn()<br />
''''''''''''''''''''''''''''<br />
s = "drop view sanad1"<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader()<br />
dr.Close()<br />
'''''''''''''''''''''''''''''''''''''''<br />
s = "create view sanad1 as select number from sanad where number = '" + TextBox97.Text + "' "<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader<br />
dr.Close()<br />
s = 0<br />
<br />
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
Call conn()<br />
''''''''''''''''''''''''''''<br />
s = "drop view sanad2"<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader()<br />
dr.Close()<br />
'''''''''''''''''''''''''''''''''''''''<br />
s = "create view sanad2 as select topic from sanad where number = '" + TextBox97.Text + "' "<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader<br />
dr.Close()<br />
s = 0<br />
so please tell me what should i do practicaly
thanks so much
|
|
|
|
|
Hi, I am creating a login for a project at college and I really do have no clue where to start. My brief is that I need to access a database for login purposes and set groups for permisions to access different areas in my program. I looked at this source http://www.codeproject.com/vb/net/Login_Control.asp but when opening I got errors so i couldnt see the structure of the code.
Any links etc would be really appreciated. Thanks.
|
|
|
|
|
Brad^ wrote: I looked at this source http://www.codeproject.com/vb/net/Login_Control.asp but when opening I got errors so i couldnt see the structure of the code.
Have you left a message for the author in the forum below the article?
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
Hi,
I want to set the Licence key concept to our vb.net Applications.
I need 20 char Licence In that 16 is the Un-crpyted value and 4 has the decrypted value.
Can any help on this?
--
With Regards,
Krishna Moorthy U.
9199944 34271.
|
|
|
|
|
Why did you ask two questions with the same header ?
Your question is not clear, you want to turn 16 letters into a 4 letter encrypted value ?
If you have a problem with an article, you should use the article's forum to ask the author.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This is Licence key generation source and Application, this has released by Donsw.
I can't able to run the application, it will shows the references error.
Here i'm giving the path, can any one give the soln?
http://www.codeproject.com/install/LicenseKeyGeneration.asp[^]
--
With Regards,
Krishna Moorthy U.
9199944 34271.
|
|
|
|
|
Have you tried contacting the author? You can ask him in the forum below his article.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
I am writing a program that uses a random access file. I have multiple structures. Lets say one of my structures is teacher information and another structure is the teachers daily schedule.
Being these are 2 different structures will they be in the same random access file or 2 different ones?
Also, do I have to have a reference to the teacher structure (random access file?) in the structure for the teacher schedule?
Like in a database do I have to have a variable that identifies the record number such as intTeachNum?
|
|
|
|
|
|
i need a vb code to pop-up the save dialog box in some time i inicialy put in antoher simple dialog box in a start of all the programs i work
fgarcia90@gmail.com
|
|
|
|
|
uhhh... What??
You're post made absolutely no sense at all. I firmly believe that if you use less than 150 words to describe your problem, you've certainly left out important details required to acturately answer your question.
|
|
|
|
|
I don't have the foggiest idea. I think he was saying something about Save Dialog, but couldn't gather much more.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
1 - dont post your email address.
2 - try writing an intelligent header. Everyone here wants VB code
3 - What does 'some time' mean ? At random ?
4 - The SaveFileDialog is probably what you want, but who can tell ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
fgarcia90 wrote: i need a vb code to pop-up the save dialog box in some time i inicialy put in antoher simple dialog box in a start of all the programs i work
EH?
I would assume you want a system.windows.forms.FileSaveDialog to jump up at startup?
that would be simple enough...
<br />
' our File Save form<br />
dim ourFSForm as windows.forms.filesavedialog = new <br />
windows.forms.filesavedialog<br />
'Set the filter<br />
ourFSForm.Filter = "INSERT FILTER HERE| *.*"<br />
' Set the initial (blank) filename:<br />
ourFSForm.Filename = ""<br />
' the result of showing the form.<br />
dim ourFSResult as windows.forms.dialogResult = ourFSForm.ShowDialog()<br />
dim fileLocation as String = ourFSForm.Filename<br />
switch(ourFSResult)<br />
case windows.forms.dialogResult.OK:<br />
...<br />
<br />
End Swich<br />
<br />
Now also, theres Already an email link on the bottom of each post!
----
Morgan Gangwere
Lead programmer, Unknown Software
"Pinky, are you thinking what im thinking?"
"I Dunno brain, how many licks DOES it take to get to the tootsie roll center of a tootsie pop?"
"You want me to calculate that? or should we take over the world?"
"ooh! OooooOOOooH! lets find out!"
|
|
|
|
|
Hi friends
Am in a bit of a fix. I have changed my system date on my pc, to the 29th of October, test the functionality of the app I was developing. I have returned the date to the presnt date but now I cant even run the other forms that I had built durng that time. Does anyone out there know how to fix this or I gotta redo my forms?
thanks for reading this
tw5ted f8
I
|
|
|
|
|
Changing the date has zero effect on the forms themselves. The only thing that can be effected is the code you wrote for the forms.
On top of that, you haven't said anything about what the problem is other than "can't run them". So there's basically nothing anyone can tell you to fix "it".
|
|
|
|
|
I have tried running the individual forms, I have changed the start up object for the project setting it to a different form. When I run the program, a different form from the one I selected as the start up object is being displayed. The forms I altered and built when I had changed the date are not being loaded.
I hope u will be able to help me
|
|
|
|
|
Wow. OK. I'd probably start by Cleaning the solution (under the Build menu) and do a Rebuild after that.
If that doesn't take care of it, I'd look into getting every file in the solution's Modified date/times back into the past and then redo the above procedure.
|
|
|
|
|
Do "Rebuild All" to get rid of object files that seem younger than their source files, but
actually got created some time ago (due to your date faking).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Didn't even think of that. He just said "it" didn't work, but didn't say what "it" was.
|
|
|
|