Community Member
Member Avatar
xrj 139 Replied To a Post in VB.net Error: cmd.ExecuteNonQuery
Topic by maharaskal in Software Development
What an old thread, isn't it? Reply by xrj
Member Avatar
xrj 139 Began Watching VB.net Error: cmd.ExecuteNonQuery
Hi Guys,

im facing problem at cmd.ExecuteNonQuery()
kindly correct me wer is the mistake? n how to correct?

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Dim sqlinsert As String
' We use the INSERT statement which tells our program to add the information
' from … Topic by maharaskal in Software Development
Member Avatar
xrj 139 Replied To a Post in define a function with different variable
Topic by ALosh99 in Software Development
In this other way the code seems to work:

x = [16.7, 16.5, 16.1, 15, 13.5,14.2, 14.9, 13.7] # an example
D = [0, 1, 4, 7, 16, 31, 64, 127] # example
n_H = 0.9
Sec_nucli = 0

## I defined the function like this:
def Fragmentation(D,x):
s_nucli = … Reply by xrj
Member Avatar
I want to define a function like this:


n_H = 0.9 # constant .
x = np.array([16.7, 16.5, 16.1, 15, 13.5,14.2, 14.9, 13.7])# example to test
D = np.array([0, 1, 4, 7, 16, 31, 64, 127])

Sec_nucli = []
x = []
D = []
Sec_nucli[i]= n_H *D[i]* x[i]

where … Topic by ALosh99 in Software Development
Member Avatar
xrj 139 Replied To a Post in First and last word to proper case
Topic by johnnyd1963 in Software Development


Dim vplaats() As String = Split(Replace(TextBox1.Text, "'", "''"), " ")
vplaats(0) = StrConv(vplaats(0), VbStrConv.ProperCase)
vplaats(vplaats.Length - 1) = StrConv(vplaats(vplaats.Length - 1), VbStrConv.ProperCase)
Dim platts As String = Join(vplaats, " ") Reply by xrj
Member Avatar
xrj 139 Began Watching First and last word to proper case
Hi can someone give me the code how i make the first and last word of a string to Propr case
The folowing gives all words to proper case

Dim plaats As String = Replace(TextBox1.Text, "'", "''")
plaats = StrConv(plaats, VbStrConv.ProperCase)

I want, shall we say: "ohe en laak" to … Topic by johnnyd1963 in Software Development
Member Avatar
Topic by JModak in Software Development
The message is telling that field pr.invno on line 1 should also figure in the Group By clause, or in a function like sum(pr.invno) or count(pr.invno) . Reply by xrj
Member Avatar
i have 3 table i inner join with 3 table and add function but now getting error please help me how to solve the the problem please help me
ERROR :Msg 8120, Level 16, State 1, Line 1
Column 'TBL_pur_inv.invno' is invalid in the select list because it is not … Topic by JModak in Software Development
Member Avatar
Featured xrj 139 Replied To a Post in Converting from 32-bt to 64-bit in C
Topic by JohnMcPherson in Programming
Is it possible for you to change lines 58 and 59 from:


ra1 = rap[j-1];
ra1 = ra1/100.0;

to:

ra1 = rap[j-1];
printf("DEBUG: ra1 is %lf\n", ra1);
ra1 = ra1/100.0;
printf("DEBUG: ra1 is %lf\n", ra1);

and debug again? Reply by xrj
Member Avatar
Featured xrj 139 Replied To a Post in Converting from 32-bt to 64-bit in C
Topic by JohnMcPherson in Programming
Another possibility is to assure the operation in line 59: `ra1 = ra1/100.0;` maybe double precision in 32 and 64 bit machines do not match the same. Reply by xrj
Member Avatar
Featured xrj 139 Replied To a Post in Converting from 32-bt to 64-bit in C
Topic by JohnMcPherson in Programming
Where is `rap[ ]` assigned a value? You should look there because the value of `ra1`comes from `rap[ ]`, so if the values in `ra1`differ it's that `rap[ ]`values are already coming different from some other code, not the one you show. Reply by xrj
Member Avatar
Featured xrj 139 Began Watching Converting from 32-bt to 64-bit in C
Hello, my name is John McPherson, and I write C code for the U.S. Department of Labor. I am in the process of converting C code for a lot states from a 32-bit system to a 64-bit system. Some states have been converted, and most have gone smoothly, but one … Topic by JohnMcPherson in Programming
Member Avatar
Featured xrj 139 Replied To a Post in Get textbox data without POST or GET calls
Topic by Mr.M in Web Development
Setting a session variable in javascript is not possible. Javascript executes on client side while php (php session variable) executes on server side, i.e. generaly on different machines. Reply by xrj
Member Avatar
xrj 139 Replied To a Post in Subscript out of range
Topic by Gokul_4 in Software Development
You may try [Here](http://forums.codeguru.com/showthread.php?305265-Getting-the-Line-Number-on-a-VB-error) and [Click Here](https://msdn.microsoft.com/es-es/library/aa264519(v=vs.60).aspx) Reply by xrj
Member Avatar
xrj 139 Began Watching Subscript out of range
I have a vb based software which is very old running on sql server 2000. When I tried to take a report, it says "runtime error 9 Subscript is aout of range".where to find this subscript? Please help me out.Thanks in advance Topic by Gokul_4 in Software Development
Member Avatar
Featured xrj 139 Replied To a Post in Get textbox data without POST or GET calls
Topic by Mr.M in Web Development
Then call by means of XMLHttpRequest another php that grabs the phone number and any other data to record what is necessary.

<script>

function checkmax(element) {

if(element.value.length == 9){

var xhr = new XMLHttpRequest();
xhr.open('POST', '/server/getPhone.php', true);
//Send the header
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

xhr.onreadystatechange = function() {//Call a function when the … Reply by xrj
Member Avatar
Featured xrj 139 Replied To a Post in Get textbox data without POST or GET calls
Topic by Mr.M in Web Development
One way could be to assign the value to a hidden input label. For example:

<?php
$_SESSION['num']='4567890123';
?>

<!DOCTYPE html>

<html>

<body>

<script>

function checkmax(element) {

if(element.value.length == 9){

var vvc = element.value;

element.value =document.forms['myForm'].elements['h1'].value;

//alert(vvc);
}
}

</script>

<form name="myForm" onsubmit="myPhp.php">

<input type="text" id="dCell"

value="Cellphone Number"
maxlength="10"
onkeypress="checkmax(this)"
name="CellphoneNumber2" … Reply by xrj
Member Avatar
Featured xrj 139 Replied To a Post in Get textbox data without POST or GET calls
Topic by Mr.M in Web Development
I agree in that the only way I can see is to submit the form back to the server. Something like:


<!DOCTYPE html>
<html>
<body>
<script>
function chkLen() {
if(document.getElementById("dCell").value.length =10)
document.getElementById("myForm").submit();
}
</script>
<form name="myForm" onsubmit="myPhp.php">
<input id="dCell" type="text" onChange="chkLen();" value="<?php echo $_SESSION['mySessionIDHere'];?>" />
</form>
</body>
</html> Reply by xrj
Member Avatar
Featured xrj 139 Began Watching Get textbox data without POST or GET calls
This may sound confusing but I have a textbox which is a cell number textbox and I want when the max length of 10 has been reached then fire the php code which is inside the same html page as form and this php code will then get the value … Topic by Mr.M in Web Development
Member Avatar
xrj 139 Replied To a Post in Problem refreshing after adding data
Topic by Catherine_5 in Software Development
Sincerely, I just have tried the 'add' method for which you were asking, at least I think so. The rest of code is your task. Reply by xrj
Member Avatar
xrj 139 Replied To a Post in Problem refreshing after adding data
Topic by Catherine_5 in Software Development
I get no error with the above code. You may include Try-Catchs, if you do know how, and see a more explanatory error. Reply by xrj
Member Avatar
xrj 139 Replied To a Post in Problem refreshing after adding data
Topic by Catherine_5 in Software Development


Imports System.Data.OleDb
Public Class Form2
Dim provider As String
Dim dataFile As String
Dim connString As String
Dim sql As String
Dim myconn As OleDbConnection = New OleDbConnection

Event UpdateDGV()
Private currentRowIdentifier As Integer

Public Sub New()
' This call is required by the designer.
InitializeComponent()

' Add any initialization … Reply by xrj
Member Avatar
xrj 139 Replied To a Post in Problem refreshing after adding data
Topic by Catherine_5 in Software Development
Besides the need of brackets for sql in reserved names as in [key] or [name], to communicate between form1 and form2 there may be a raising event.


Imports System.Data.OleDb
Public Class Form1
Public dbconn As New OleDbConnection
Dim adt As New OleDbDataAdapter
Dim ds As New DataSet

Dim datatable As … Reply by xrj
Member Avatar
xrj 139 Began Watching Problem refreshing after adding data
At the beginning welcome all.

I have a big problem and I can not deal with it. I would like to refresh dategridview after adding and editing data.
I try to add ShowData() function on closing Form2 and that didn't work.
Thanks for any help or advises :)

and link … Topic by Catherine_5 in Software Development
Member Avatar
Topic by josh_4 in Programming
@Josh_4 Please, take a look to the answer at your first thread [Here](https://www.daniweb.com/programming/threads/508636/set-icon-for-nodes-in-xmltreeview-via-xml-file-vb-net/2) Reply by xrj
Member Avatar
Hello Daniweb-Community,

I got a node in my xml-File for a java-link. it looks like "C:\Program Files (x86)\Tool7\javaw.exe -splash:splash.png -cp ./cl/cl.jar; -Dawt.useSystemAAFontSettings=on"
If i start the tool by double click on the node, it doesn´t start it, because it doesn´t load the arguments.
Next i createt a new attribut (called … Topic by josh_4 in Programming
Member Avatar
Topic by josh_4 in Programming
The xml file should look like the following:

<?xml version="1.0" encoding="UTF-8"?>
<Programme Path="1">
<Feld Icon="Folder.ico" Path="2">Feld 1<VisualStudio Path="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" Icon="VS.png">Visual Studio</VisualStudio>
<Excel Path="C:\Program Files\Microsoft Office 15\root\office15\EXCEL.EXE" Icon="Excel.png">Excel</Excel>
</Feld>
<Home Icon="Folder.ico" Path="3">Home Place<Notepad Path="C:\Program Files\Notepad++\notepad++.exe" Icon="notepad.png">Notepad ++</Notepad>
<JaTool Path="C:\Program Files (x86)\Tool7\javaw.exe" Argumente="-splash:splash.png -cp ./cl/cl.jar; -Dawt.useSystemAAFontSettings=on" Icon="JaTool.ico" RunPath="C:\Program … Reply by xrj
Member Avatar
Topic by josh_4 in Programming
The easiest way to store the attributes is in a new class, in order to extend the NodeTree class. So when reading the xml attributes, store them in this -let's call it- 'extendNode' class. Then, in the TreeView node all it's needed is to set the node's 'Tag' property to … Reply by xrj
Member Avatar
xrj 139 Replied To a Post in Code Snippet Permutations in Vb.net
Topic by xrj in Software Development
Not an improved version, but just a functional code for what you ask:


Module Module1

Dim vChar() As Char
Dim vIndex() As Int32
Dim N, r, cnt As Int32
Sub Main()
Try
Console.Write("How many objects? ")
N = Int32.Parse(Console.ReadLine)
Console.Write("How many taken at a time? ")
r = Int32.Parse(Console.ReadLine)
If … Reply by xrj
Member Avatar
Topic by josh_4 in Programming
By custom arguments I mean custom attributes. In a xml file a node may have as many attributes as you wish, but Treenode control has it's own and fixed properties. In case you need to add extra attributes to Treenode you may create a custom class derived from Treenode. Reply by xrj