|
Hello everybody,
We are planning to work on a project. The client side will be created with VB.net. This VB.net will call the backend of c code. I did the similar thing with php to call the backend of c code. The bridge between the php and c code was created with php extension for wrapping c code. Could you give a suggestion what kind of bridge will be created between VB.net and c code?
Thank you very much for your any suggestion
Jane
|
|
|
|
|
VB.NET can talk to managed C++, or c or C++ that is in a dll. COM is another option, but managed code is a far better one.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thank you very much for your information. Could you tell me where I can find this kind of code example?
Jane
|
|
|
|
|
Nish has written a book which is almost published and which is the best source of info I've found on C++/CLI. www.voidnish.com ( or .net, not sure ) is his blog, it's probably the best source of info before the book is published, or you can search CP for Nish to read his articles.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I am looking to perform a MySQLDump through my application. All required variables and such provided, including save-to path. Additionally, this would be the same database which my app would already be connect to using the MySQL Connector/Net.
First of all, is this possible?
Secondly, is there an alternative preferred approach to database backup using VB.Net?
If so, I'd appreciate any code examples and/or article references. Thank you!
|
|
|
|
|
I am not able to update database even though I have the code right from what I know. Any help will be appreciated. Here is the code for add record once changes have been made.
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click<br />
If Ds1.HasChanges() Then<br />
da1.Update(Ds1)<br />
MsgBox("done")<br />
Else<br />
MsgBox("not done")<br />
End If<br />
End Sub
-- modified at 19:57 Wednesday 26th July, 2006
|
|
|
|
|
Show The rest of the Code. Where is the Update statement? Do you get an error?
|
|
|
|
|
|
I presume Ds1 is a Dataset, how many tables are there and do each table include a primary key.
GUERVEN
Truth or Consequence
|
|
|
|
|
i figured out my error. I was not updating the dataset. Thanks for everybody's help on this.
|
|
|
|
|
Hi!
Please take a look at this code...
Public Sub GravaConfiguracao_Fideliza(ByVal intESC As Integer, ByVal dblVE As intPE As Integer)
Dim strInsert As String = "Insert Into Configuracao (Escalao, ValorEscalao, PontosEscalao) Values (" & intESC & ", " & dblVE & ", " & intPE & ")"
Please note the variable dblVE. It is a Double variable. If it's value is for instance 0.5 when the strInsert string is created the dblVE variable is converted to 0,5 and then SQL Server reports an error because in the end the string is created with 3 fields and "4" values...
Can anyone help me with this?
TIA
Jorge
|
|
|
|
|
ei,
Public Sub GravaConfiguracao_Fideliza(ByVal intESC As Integer, ByVal dblVE As intPE As Integer)
can you tell what this parameter declaration mean. if confused about the double AS
is that a valid statement?
GUERVEN
Xuriuxs
|
|
|
|
|
Hi!
I'm sorry about the mistaken code...
The correct one is as follows:
Public Sub GravaConfiguracao_Fideliza(ByVal intESC As Integer, ByVal dblVE As Double, ByVal intPE As Integer)
Dim strInsert As String = "Insert Into Configuracao (Escalao, ValorEscalao, PontosEscalao) Values (" & intESC & ", " & dblVE & ", " & intPE & ")"
Thnaks
Jorge
|
|
|
|
|
Use the ToString method to convert the value instead of using implicit conversion. Then you can specify a culture or format provider. Use CultureInfo.InvariantCulture or NumberFormatInfo.InvariantInfo to get a format that uses decimal period.
---
b { font-weight: normal; }
|
|
|
|
|
Hi!
I solved the problem thanks to you.
Thank you very much for the tip!
Jorge
|
|
|
|
|
Hello, I am trying to write a user, user group and server administration program. But I'm a bit stuck when it came to writing the currently logged on users and sessions.
Any help and/or source would be much appreciated.
Aaron
I forgot I use Visual Basic .NET 2005
Thanks
|
|
|
|
|
I'm hashing a string, and the hash function is then returning a byte array. Is there any way to turn that byte array into a string? (ex. "0x028924E0FA2932")
Background: I'm trying to insert binary data into a SQL Server DB and I want to see if i can combine all the fields to create a single INSERT query so i can insert it into the DB without hassling with a dataset.
|
|
|
|
|
I had to do this for a program I wrote...
Best I could come up with:
imports system
dim bytes() as byte = { <Your bytes> }
BitConverter.ToString(bytes, 0, bytes.Length)
Since the format it uses is a little weird (seperated by dashes), I needed to add some extra processing for my app...
BitConverter.ToString(bytes, 0, bytes.Length).Replace(CChar("-"), CChar(","))
This delimits the bytes with commas (usefull probably only to me) but if you are creative with the string manipulation, you can do damn near anything!
Hope this helps!
|
|
|
|
|
Oh wow, you're right. That worked beautifully. Thanks a bunch!
|
|
|
|
|
Why not use base 64?
The method Convert.ToBase64String turns a byte array into a base 64 encoded string.
---
b { font-weight: normal; }
|
|
|
|
|
I don't believe the output of System.Security.Cryptography.sha1managed.computehash() is base64, and that's what I'll be comparing this against.
-- modified at 17:14 Wednesday 26th July, 2006
Actually I'm getting ahead of myself. You'd be best to ignore me...
|
|
|
|
|
Hello all, i am new here and have been assigned a project. We have a need to delegate a small group of individuals the ability to disable and enable AD users in a certain OU. Instead of giving them access to ADUC, i wanted to build a small VB app that consists of a combo box that displays the users in the OU, then a radio button for enable account and another for disable account. Then an apply button and cancel at the bottom. I am new to coding and generally have just gotten snippets and modified them to my own use in the past, but i am having a ahrd time finding the sippet to do what i need. I figure this is an easy one for all of you experts out there. If anyone can lend me a hand, i would be appreciative!
Thanks
Parry
|
|
|
|
|
Hey Parry!
Although I am not new to programming, I am new to VB.NET. That said, perhaps we can pool our minds and come up with a solution for you.
I believe I know what you are trying to do but in order to assist you further I need clarification on the following:
AD
OU
ADUC
How you are storing the users
How you plan to store whether a user is "enabled" or "disabled"
Thank you!
|
|
|
|
|
AD - Active Directory
OU - Organizational Unit
ADUC - Active Directory Users and Computers
I have searched for ways to query active directory (ad) but is it somewhat confusing. Within the Active Directory there are "organizational Units" They work somewhat like file folders in which the users and computer accounts are stored.
How you are storing the users. I would like for the program to just store the "usernames" in the combo box. I do not care if they are all lost when the program is closed. Then I would like to use the "username" selected from the combo box to be stored as a variable to use when the "apply" button is pressed.
How you plan to store whether a user is "enabled" or "disabled" - I would like to read that form Active Directory, if possible and then reflect the status on the radio buttons "checked" field. I was able to code to turn off one if the other is on
In the end, when the "apply" button is pressed, i would like the user selected in the combobox to have the status applied based on the status of the radio button.
Thanks for your help.
|
|
|
|
|
Hi - how would one go about exporting a datagridview to MS Word? I have numerous (dynamically created) dgvs, and they need to get on a Word document (for reporting purposes) - including cell colors and row/column headers.
can't find anything like this (basically a cut and paste operation)
Any guidance would be sincerely appreciated - thank you in advance.
Cheers,
- James
|
|
|
|