|
The statement you used in SQLPlus is not identical to the statement your generating using string concatenation. A practice which, BTW, is frowned upon with great predjudice here at CP. You've opened yourself up to SQL Injection attacks using this method. You've also robbed yourself of the wonders of having SqlParameter objects check your values and convert them to the appropriate format for you, automatically. But if you want to give yourself more work, like this problem your having, that's fine us too.
But, if you want to do it the right way from the start, look into parameterized queries. You'll save yourself alot of hassel in the future and it's what real companies expect of your code.
Now, back to your problem. You might want to dump that string to the Output window before you execute it so you can see EXACTLY what your trying to have SQL execute for you.
strSql = "Inset into StudentTransaction(..."
Debug.WriteLine(strSql)
...whatever code you have next, set a breakpoint on this line
then look in the Output window of the IDE to see the
SQL statement your code actually built.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I have a problem in Visual Basic 6.0:
I have created 2 textboxes and 2 timers. I have set the interval for one timer as 1 and the interval for the other timer as 1000. I am using 2 counters, one in each timer and displaying the value of each counter in the 2 different textboxes. Each counter is increased by 1 whenever the corresponding timer event is executed.
Therefore when the second textbox displays the value 1 (i.e when the timer with interval 1000 is executed once), the value in the first textbox must be 1000 (since the first timer interval is 1).
But this is not happening. The first textbox displays a value less than 100. What could be the problem?
Here is the code:
General declarations:
Dim ctr1, ctr2 As Integer
Private Sub Form_Load()
ctr1 = 0
ctr2=0
End Sub
Private Sub Timer1_Timer()
ctr1 = ctr1 + 1
Text1.Text = ctr1
End Sub
Private Sub Timer2_Timer()
ctr2 = ctr2 + 1
Text2.Text = ctr2
End Sub
-----------------------------------------------------------------------------
Interval of timer1 is 1 and interval of timer2 is 1000 and both are enabled by default.
|
|
|
|
|
You'll never to get this to work that way you think it should.
The Timers send their Tick events into the Form's message pump, they don't call the functions directly. Also, the timers don't really have a resolution of 1 millisecond. You can get 1000 tick events out of your first timers, but it'll take greater than one second to execute them all while updating the text in the TextBox. This is because when you update the TextBox, you're also injecting WM_PAINT messages into the Form's message queue, between Tick events for the timer. Starting to see why your now getting 1 millisecond performance yet? It takes greater than 1 millisecond to repaint the invalidated regions of the form and it's controls. So, now that you've repainted the form between the Tick event at 1 millisecond and the tick event at 2 milliseconds, you've actually used up about 10 milliseconds updating and repainting the form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am working on a program in VB.Net which reads and send SMS via a modem (Brand is iTegno) which has a normal mobile phone SIM card. Sending and reading of SMS in English is working.
Receiving SMS with Chinese text is also solved by decoding the text received. However, I have not been able to send SMS in Chinese. My research on this issue reveals that I have to sent the SMS in PDU format. I managed to go as far as sending(using AT commands) the message length. I get a response Invalid PDU parameters on sending the message. Would appreciate if someone can identify what is causing the error. Here is what my program is doing:-
Step #1
Send command "AT+CMGF=0" + chr(13) 'to indicate PDU format
Gets a repsonse "OK"
Step #2
Send command "AT+CMGS=16" + chr(13)
Gets a repsonse ">"
Notes:
16 is the length from 11|00|0B|91|06|21|13|69|16|F7|00|08|AA|02|4E|2D sent in Step #3
Step #3
Send a string containing the hexadecimal values
11|00|0B|91|06|21|13|69|16|F7|00|08|AA|02|4E|2D + chr(26)
Gets a repsonse ""+CMS ERROR: 304".
304 is error code for Invalid PDU mode parameter
Notes:
00|11|00
SMSC Center Address | Message Flag | Message Reference Number
0B|91|06|21|13|69|16|F7 – Destination Address
11 Digits | International Number | Phone Number 60123196617
00|08|AA
Protocol identifier | Data Coding Scheme(Chinese UCS2) | Validitity Period
02|4E|2D – User Data
2 pairs | Message '中'
bgm2291
|
|
|
|
|
It looks like you need to be Googling for this. So far, I don't see a VB.NET question in your post.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
iTegno has a developers contact at this email address: developers@itegno.com
|
|
|
|
|
Hello,
Please tell me how to check whether the wav file is in the PCM format or in some other format using visual Basic.
Thank u
goood
|
|
|
|
|
http://www.vbaccelerator.com/home/VB/Code/vbMedia/Audio/WAV_File_Viewer/article.asp
|
|
|
|
|
Hello everybody !
I am making a class, in these class I want to Inhertit DataColumnCollection Class but it's giving some error on inherit.
Error:-
Class must declare a 'Sub New' because its base class 'DataColumnCollection' does not have an accessible 'Sub New' that can be called with no arguments.
pkc
|
|
|
|
|
I have developed an account system. and when i deploy it a message appeared "Some files are out of date". i just countinued but on target mechine a message appeared "Some files are out of date do you want to update them click yes to restart" i did and after loading windows again when i started setup.exe again same message appeared again so i am still unable to install that application . Target plate form is Microsoft Windows 98.
Salman Sheikh
|
|
|
|
|
hello, how can i add a SWF file to a form without importing it as a picture
|
|
|
|
|
You'll have to add a Reference to the Flash Player COM control, add it to the ToolBox, then drop one on your form. I'm not really familiar with it past that though.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
can anybody suggest me a way to build a trial version of a progrm using code?
samitha
|
|
|
|
|
Hi,
I try to upload DBGrid in localhost (Windows Server), i use Tomcat 5 and it's running well, but when i uploaded the DBGrid project in IP Public, it's an error :unable to load tag handler class "com.freeware.gridtag.DBGrid" for tag "grd:dbgrid"
Notes: i use Linux server in IP public.
please give me the solution ASAP.
|
|
|
|
|
First off, we don't support third party controls here. Considering there's thousands of them out there, it's impossible for us to know every single one.
Second, you haven't supplied any of your code showing what your doing (or not doing). Without that, there's little we can do to help you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How to dynamically add tab and picture control as a pair?
I tried something like the following. but it didn't show
each picture control on each tab.
For i = 1 To 5
Load Picture1(i)
Load TabStrip1(i)
Picture1(i).Visible = True
Picture1(i).Left = Picture1(i).Left + 100
tab
Next i
how can i achieve this.
I am using vb6
|
|
|
|
|
My VB6 is pretty rusty, but here goes...
Load only loads forms, not controls. What you have to do is create a new instance of the control you want, then add it to the Controls collection of the form/control you want to host the new control.
In your case, you want to make a new Tab, not a TabStrip, add it to the TabStrip's Tabs collection.
Dim newTab As New Tab
newTab.Name = "Tab3"
newTab.Caption = "My New Tab"
TabStrip1.Tabs.Add(newTab)
Adding the PictureBox control is done just about the same way.
Dim newPicBox As New PictureBox
newPicBox.Width = ...
newPicBox.Height = ...
newPicBox.Left = ...
newPicBox.Top = ...
newPicBox.Name = "PictureBox3"
Form1.Controls.Add(newPicBox)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am working on a web application project where i need to uplaod many pdf/doc files onto the webserver and download those files when the user clicks the corresponding hyperlink.
I used the following code to upload the file, where MyFile is the html file input control.
If Not MyFile.PostedFile Is Nothing And MyFile.PostedFile.ContentLength > 0 Then
Dim fn As String = System.IO.Path.GetFileName(MyFile.PostedFile.FileName)
Dim SaveLocation As String = Server.MapPath("Articles") & "\" & fn
Try
MyFile.PostedFile.SaveAs(SaveLocation)
Response.Write("The file has been uploaded.")
Catch Exc As Exception
Response.Write("Error: " & Exc.Message)
End Try
Else
Response.Write("Please select a file to upload.")
End If
but it doesn't write it on the server( i need to load this onto my school's web sever.)
How do i download this file? If possible, how can i disable the save button on the pdf fiels when the user downloads the file.
I am using asp.net and vb.net , if anybody can help me write a code to this project it will highly appreciated.
|
|
|
|
|
Your question really belongs in the ASP.NET[^] Forum. It doesn't have anything to do with VB, even though your wrote in VB.
Also, you haven't supplied any error messages or exceptions that are thrown. The most common things to check is if the servers ASPNET account (or whatever account your application is running under) has the permissions to write a file to whatever path your trying to save this file to. By default, it doesn't have this permission.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Well, the Font property is read/writable. But, once created, the Font is immutable. You can't modify it. What you have to do is create a new Font object and assign it to the ListBox.Font property. But, you can create a new Font by using an existing one and modifying the parameters as you do so:
ListBox1.Font = New Font(ListBox1.Font, ListBox1.Font.Style Or FontStyle.Bold)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Not through properties. It's all or nothing. The only way to do it is if you were to owner-draw the control. This will give you the ability to draw each item individually, and in the process, change its font.
Search the articles for "custom listview" and you'll find examples of owner-drawing the ListView control.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I just need to know how to find the "Type of File" property that is found when you right click on a file in WinXP. There is a line in the properties window that reads "Type of File" and then reads the application that uses that file, like Adobe Acrobat Document, or Microsoft Word Document. I'm using the Dsofile from microsoft to determine the author, title and etc, but i don't see anything pertaining to the "Type of File". I also know how to determine the extension of a file using the FileInfo. Any ideas? thanks!
|
|
|
|