|
Dim objCmd As New ADODB.Command
Dim objparameter As New ADODB.Parameter
Dim objRs As New ADODB.Recordset
Dim con2 As New ADODB.Connection
Dim xmlstr, clisttype, clistremarks, clistfdate, clisttdate, cno, cjudge1, cjudge2, cjudge3, constr As String
xmlstr = "<?xml version=""1.0"" encoding=""iso-8859-1"" ?><causelist><date>"
constr = " Provider=MSDataShape;Persist Security Info=False;Data Source=10.130.8.15;User ID=sa;Password=sa;Initial Catalog=dbname;Data Provider=SQLOLEDB.1"
'chandak
xmlstr = xmlstr + "<causelisttodate>" & clisttdate & "</causelisttodate>"
xmlstr = xmlstr + "<causelistfromdate>" & clistfdate & "</causelistfromdate>"
xmlstr = xmlstr + "<common_remarks>" & clistremarks & "</common_remarks>"
xmlstr = xmlstr + "<end_remarks>" & clistremarks & "</end_remarks>"
xmlstr = xmlstr + "<court>"
xmlstr = xmlstr + "<courtno>" & cno & "</courtno>"
xmlstr = xmlstr + "<courtremarks></courtremarks>"
xmlstr = xmlstr + "<judge1>" & cjudge1 & "</judge1>"
xmlstr = xmlstr + "<judge2></judge2>"
xmlstr = xmlstr + "<judge3></judge3>"
xmlstr = xmlstr + "<judge4></judge4>"
xmlstr = xmlstr + "<judge5></judge5>"
con2.Open constr
objCmd.ActiveConnection = con2
objCmd.CommandType = adCmdStoredProc
objCmd.CommandText = "causelistxml"
objCmd.Parameters.Append objCmd.CreateParameter("date", adVarChar, adParamInput, 10, Text1.Text)
objCmd.Parameters.Append objCmd.CreateParameter("courtno", adVarChar, adParamInput, 10, Text2.Text)
objCmd.Parameters.Append objCmd.CreateParameter("courtno2", adVarChar, adParamInput, 10, Croom)
objCmd.Parameters.Append objCmd.CreateParameter("date2", adVarChar, adParamInput, 10, clistfdate)
objCmd.Parameters.Append objCmd.CreateParameter("alloted", adVarChar, adParamInput, 10, Alloted)
'objRs.Open con, adOpenStatic, adLockReadOnly
Dim pstage As String
Dim ii As Integer
'ii = objRs.RecordCount
pstage = ""
Set objRs = objCmd.Execute
'con.Open constr
'OpenConnection
objRs.Open
'objRs.Open objCmd, adOpenStatic, adLockReadOnly
For ii = 0 To objRs.RecordCount
xmlstr = xmlstr + objRs.Fields("part1") + objRs.Fields("part2")
Next ii
'If Not objRs.EOF Then
'Do While Not (objRs.EOF)
' xmlstr = xmlstr + objRs.Fields(0) + objRs.Fields(1)
' objRs.MoveNext
' Loop
' End If
Set objCmd.ActiveConnection = Nothing
objRs.Close
I used debug when cursor focus on for loop, Its throw a Error :
Run Time Error '3704'
Operation is not allowed when the the object is closed
Help plz.......
|
|
|
|
|
Saurabh Chandak wrote: I used debug when cursor focus on for loop, Its throw a Error :
Run Time Error '3704'
Only when you're debugging? Not when you simply run the VB6-application? I'd guess that could be caused by a time-out, as the Sql-statement is expected to return a result within a certain period. Your connection-object has a property that you can use to change the timeout-values.
I are Troll
|
|
|
|
|
I have a assembly that contains a class and a strongly typed dataset. I want to expose one datatable as the return datatype on a function - but not expose the whole dataset.
For example:
Public Function GetImportSortOrder(ByVal vEffDate As String, _
ByVal vPlant As Integer, _
ByVal vImportID As Integer) As BusinessLogic.DataSet_ImportData.DataTable_ScheduleOrdersDataTable
If I have the dataset modified set to public, the table in question can be seen externally. If I instantiate the datatable, I can create a SO datatable such as:
dim o as BusinessLogic.DataSet_ImportData.DataTable_ScheduleOrdersDataTable
But all the other datatables in the dataset are also listed. I don't want to show/expose the other datatables. If I go into the dataset.designer.vb file and change the modifier to friend on all other datatables, the modifer is changed back to public when I recompile. How can I accomplish just exposing the one datatable and not all of them? The tableadapters have a "Modifier" property that does just this, but not the datatables themselves.
I'm probably overlooking something simple. Thanks for any guidance.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Was my question clear enough or can this not be done? Not a critical question, just curious if it could be done.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
I have designed a word processor with some special features anyways I can save the file one time but then after that I get a fileaccess error saying it is being used by another process but its not the only process was the savefile. Does anyone know whats wrong? Please help!
|
|
|
|
|
yes, this is one of those confusing error messages. When it says that, it really means to say: "Failing to ... because the file is being used by this very process or maybe even another process".
The typical cause is either one of these:
1.
your app has the file still open, i.e. you forgot to dispose of the File, FileStream, or whatever relevant object you used earlier to access that file.
2.
another app is busy accessing your file; typical candidates are indexing programs, and AntiVirus programs (both are very interested in fresh files!). If so, all it takes is a few seconds of patience and a retry.
|
|
|
|
|
hi, im doing a quiz application.
how to get a value from website textbox in another class file, in order to do calculations?
Your solution/guidance is much appreciated (:
modified on Monday, January 3, 2011 4:39 AM
|
|
|
|
|
Can you use session? Please explain more your requirement.
|
|
|
|
|
My project requirement is to "develop assessment materials (electronic circuit module) for an elearning system".
The website will automatically run a randomnize number in a textbox during the page load for each resistor. & it works.
For development purposes we've created few textboxes to calculate the answer once we hit the submit button.
But unfortunately it didnt generate the correct value yet it gave 0.
We've created a formula class file, randomNum class file & resistor aspx.
The calculation is to be done in the class file.
Hope my explaination helps (:
|
|
|
|
|
|
i have tried this. but always showing invalid.
what change i am supposed to do for making the system date format to dd-mmm-yyyy
Dim reg As RegistryKey
reg = Registry.Users.OpenSubKey("S-1-5-21-1757981266-861567501-682003330-500\Control Panel\International", True)
If Convert.ToString(reg).Trim = String.Empty Then
MsgBox("Invalid")
Else
reg.SetValue("sShortDate", "dd/MM/yyyy")
reg.SetValue("sLongDate", "dd/MM/yyyy")
End If
|
|
|
|
|
|
I'd try Registry.CurrentUser.OpenSubKey("Control Panel\International", True)
|
|
|
|
|
Just Replace this line:
reg = Registry.Users.OpenSubKey("S-1-5-21-1757981266-861567501-682003330-500\Control Panel\International", True) TO
reg = Registry.CurrentUser.OpenSubKey("Control Panel\International", True)
"S-1-5-21-1757981266-861567501-682003330-500" is not a valid reg key.
|
|
|
|
|
How does repeating the same information given by an earlier response help anyone?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Quick background: I'm a former C++/STL/MFC programmer, now working as a veterinary practice manager. My 10+ daily hours of hardcore programming have been replaced by a once-a-month opportunity to debug an Excel macro, or write some VBScript.
Anyway - we are using Windows Terminal Services in the clinic. We'd like to be able to send a message to our reception terminals when someone is ready to go home. We've been using Net Send, but security issues asides, the message often goes to the wrong person.
Msg.exe seems to work better, however rather than sending the message to a person (specific user account), I'd like it to go to specific terminals (which could be in use by anyone.) Msg allows me to send to a session by name or ID - but how to determine the session info for a specific terminal? I have been looking at WMI but cannot find any class or set of classes that ties all this together.
Thx
Jim Johnson
Practice Manager
Animal Health Associates
http://www.animalhealthassociates.org
modified on Friday, December 31, 2010 8:14 PM
|
|
|
|
|
I cannot help you with your problem but I will offer a word of advice.
It is a very bad idea to post an Email address on a public forum like this one. I know that it might be good advertising but don't be surprised if your spam count goes up dramatically.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
ouch. of course. Thx for the reminder.
|
|
|
|
|
How about writing a program that always runs in the background (or as a service) that waits for a connection and then displays messages that were sent to it?
See if you can crack this: fb29a481781fe9b3fb8de57cda45fbef
The unofficial awesome history of Code Project's Bob!
"People demand freedom of speech to make up for the freedom of thought which they avoid."
|
|
|
|
|
No, I'm looking for the simple solution. All I need is a bit of code to determine session name or ID given some way to identify the terminal - either the tcp/ip addy or the terminal name.
|
|
|
|
|
Your problem seemed interesting to me so I did a bit of research and came across a product called "WinSent".
This product is not free, but seems fairly priced.
Check it out ...
http://www.winsentmessenger.com/[^]
|
|
|
|
|
Thx, but I need to roll this one myself. The staff needs a simple function that they can tie to a single keystroke, enter a short message ("Fluffy RTG") and then get back to work. All the shareware solutions I have tried either don't work correctly (Fomine), or are overfeatured.
|
|
|
|
|
Salam Dears
This is Fida, I have Recently Joined in. I Have a Problem and confusion In how to write MySQl Queries in Vb.NET For My Data Base.
and Also How Can I got a Connection to My Database Through Code.
Thnks
|
|
|
|
|
|
He's probably playing with us.
|
|
|
|