vb.net

Passing comma delimited list as parameter to IN clause for db2 query using designer in visual studio 2008

我是研究僧i 提交于 2021-02-04 16:36:05
问题 I want to pass a comma delemited list of values as a parameter to a query I'm building using the designer in Visual Studio 2008 based on some strongly typed DAL tutorials I was going through. The query is going against a DB2 database. Here's what I want to do: select * from prices where customer in(?) It works fine win I pass in 123456 as ? But fails when I pass in '123456' (it is a char field so I don't know why this doesn't work; it must be adding these behind the scenes) or 123456, 123457

Custom comparer datagridview sort

一个人想着一个人 提交于 2021-02-04 16:35:27
问题 I have a datagridview with a bindingsource as datasource, and the bindingsource has a datatable as a datasource. Some columns are strings but I want them to be sorted in a specific way. The grid sorts them as 1, 10, 10,0 44a, 6c. But I want them to sorted: 1, 6c, 10, 44a, 100 as if i would take the numbers only from the values and sort them accordingly. Is there a way I cand add a custom comparer when certain columns are being sorted? Any other soulutions would be ok if the grid,

SQL Server stored procedure and execute in VB.NET

天涯浪子 提交于 2021-02-04 12:34:58
问题 This is a bit old-contents to be discussed but I need someone who can explain me how to create stored procedure in SQL Server for returning a value from procedure, example: SELECT NAME, ADDRESS FROM CUSTOMER WHERE IDCUSTOMER = 'DS212'; Then I need the name of its customer and the address instead. I need to make it as a stored procedure and show me how to execute it on VB.NET. Perhaps we assume that the name will be prompted to LABEL1.TEXT and the address will be prompted to LABEL2.TEXT. I've

SQL Server stored procedure and execute in VB.NET

試著忘記壹切 提交于 2021-02-04 12:34:28
问题 This is a bit old-contents to be discussed but I need someone who can explain me how to create stored procedure in SQL Server for returning a value from procedure, example: SELECT NAME, ADDRESS FROM CUSTOMER WHERE IDCUSTOMER = 'DS212'; Then I need the name of its customer and the address instead. I need to make it as a stored procedure and show me how to execute it on VB.NET. Perhaps we assume that the name will be prompted to LABEL1.TEXT and the address will be prompted to LABEL2.TEXT. I've

The WebBrowser control won't work with Proxies from a text file

房东的猫 提交于 2021-02-04 08:07:32
问题 I'm not that great with visual basic so sorry about that, but I have a basic understanding of java, and a few other programming languages so I'm not completely new. I want to make a program that connects to a website with a proxy loaded from a text file, but when I debug it, it gives me a bunch of different error messages, like: HTTP Error 503. The service is unavailable The webpage cannot be found etc. Here is my code for loading in the proxies into a listbox: Private Sub Button1_Click(ByVal

Datetime issues with vb.net and MSSQL

五迷三道 提交于 2021-02-02 08:46:42
问题 I am been creating a desktop form in vb.net in which I used datetime-picker tool. I want a format of dd/MM/yyyy so I kept that format from the datetimepicker properties. But when I am trying to insert the records from vb.net to MSSQL, it will obvious shows me SQL Exception: conversion failed when converting date and/or time from character string. because MSSQL supports some ISO FORMAT and all.(MM/dd/yyyy, accepted and ran properly,I tried this). So I thought to convert the date into vb.net,

Datetime issues with vb.net and MSSQL

孤街醉人 提交于 2021-02-02 08:38:53
问题 I am been creating a desktop form in vb.net in which I used datetime-picker tool. I want a format of dd/MM/yyyy so I kept that format from the datetimepicker properties. But when I am trying to insert the records from vb.net to MSSQL, it will obvious shows me SQL Exception: conversion failed when converting date and/or time from character string. because MSSQL supports some ISO FORMAT and all.(MM/dd/yyyy, accepted and ran properly,I tried this). So I thought to convert the date into vb.net,

Best practices on load a form inside a main form, both residing in an external DLL assembly

余生颓废 提交于 2021-01-29 22:50:58
问题 I've loaded an external DLL into your project like this Dim assembly As Assembly = Assembly.LoadFile(libraryPath & "filename.dll") Dim type As Type = assembly.[GetType]("NameSpace.ClassName") // i'm loading as a form here but can be any control Dim frm As Form = TryCast(Activator.CreateInstance(type), Form) What are the best practices if you're loading a class or a control inside the loaded form (above) that resides also inside the same assembly ? for instance: Lets say you loaded an assembly

Serial port project form close not responding

↘锁芯ラ 提交于 2021-01-29 22:47:11
问题 I want to make serial port based project i have code like this .when i try to close my form it become not responding and hang my app please give suggestion and correct my mistakes in my code thank you in advance Imports System Imports System.ComponentModel Imports System.Threading Imports System.IO.Ports Public Class frmMain Dim bw As BackgroundWorker Dim myPort As Array 'COM Ports detected on the system will be stored here Delegate Sub SetTextCallback(ByVal [text] As String) 'Added to

Serial port project form close not responding

亡梦爱人 提交于 2021-01-29 22:45:12
问题 I want to make serial port based project i have code like this .when i try to close my form it become not responding and hang my app please give suggestion and correct my mistakes in my code thank you in advance Imports System Imports System.ComponentModel Imports System.Threading Imports System.IO.Ports Public Class frmMain Dim bw As BackgroundWorker Dim myPort As Array 'COM Ports detected on the system will be stored here Delegate Sub SetTextCallback(ByVal [text] As String) 'Added to