|
You can use following command to update table with select statement
Dim sqlString As String = "select * from employee where id=1"
Dim comm As New SqlCommand(sqlString, conn)
Dim adp As New SqlDataAdapter
Dim sb As New SqlCommandBuilder(adp)
adp.SelectCommand = comm
Dim ds As New DataSet
adp.Fill(ds)
row(3) = "Dealer"
adp.Update(ds)
Kumar Prabhakar
|
|
|
|
|
I'm new to screen scrape. can anybody help me on how to screen scrape a web page
|
|
|
|
|
|
FYI:
I'm programming in Visual Basic 6.0
I have an ADODC control that is linked to a .mdb file I created in Microsoft Access
The provider I am using to connect to the database is Microsoft Jet OLE DB 4.0
My Problem:
String comparisons in my SQL queries are not behaving the way I'd like:
As a silly example,
SELECT * FROM tbl WHERE 'a' = 'A' returns everything in tbl
SELECT * FROM tbl WHERE 'a' > 'A' returns nothing in tbl
SELECT * FROM tbl WHERE 'a' < 'A' returns nothing in tbl
How do I make the above comparisons so they are case sensitive?
I need my comparisons to abide by the following character ranking scheme:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffpro01/html/GettingStartedwithADO.asp
Under this scheme, the following holds:
'a' = 'A' = FALSE
'a' > 'A' = TRUE
'.0000m3d10_1' > '.0000m3d10Z' = TRUE
Your help is greatly appreciated!
-Lee``
-- modified at 16:09 Wednesday 12th July, 2006
|
|
|
|
|
Hello, all!
Once again, I'm new to VB as a whole and have a fairly basic question. What I have is a panel control filled with several link labels. The current size of the panel control (and the size it needs to stay) allows for four link labels to be readily viewable but if there happens to be a fifth link label or more they are added below the bottom of the panel.
I simply need to add a scrollbar to the panel that will allow the user to scroll up and down within the panel. As always, any help is greatly appreciated. Thank you in advance!
|
|
|
|
|
Pretty much, all you need to do is set the Panel's .AutoScroll property to True . Whalla! Instant scrollbar, if the need arises.
You can check out the documentation on this here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Haha.
Wow.
Very simple - something that I have grown to love about VB.NET. I come from a game development background where we used Object-Oriented C++ and no MFC (MFC creates way too much overhead to allow for the processing speed necessary in games these days).
I can see why VB.NET is quickly becoming a standard for app development.
Thank you for the help!
|
|
|
|
|
IP-GATES OFFERS MCSE CCNA BOOT CAMP TRAINING IN INDIA/GOA
MCSE CCNA CCNP MCSD VB.NET RHCE CHECKPOINT CCSE CCSP
COST EFFECTIVE .A STUDY AND HOLIDAY EXPERIENCE
Course fee includes Hotel accomodatin(Beautiful holiday resorts in Goa), Local transport,Dinner cruise and a jungle trip
IP-GATES (IT TRAINING TRUSTED GLOBALLY)
http://www.ipgates.com
|
|
|
|
|
Get your damn ad out of here! SPAMMER!
If your too cheap to BUY advertising space on CodeProject, how is anynone to take you seriously?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
Is it possible to execute the sql server 2005 Jobs from vb.net 2005?
If Yes than can you tell me how it's possible?any link or any snappet code or
any articles by which it describe who idea then it will be good for me.
Any alternative way to do that is also acceptable?
Basic requirement is to call / execute sql server 2005 Job from vb.net 2005
thanks in adv.
montu3377
|
|
|
|
|
It's done the exact same way you execute any SQL statement from VB.NET, like SELECT, UPDATE, INSERT, ... The question comes down to what's the SQL statement you need to execute to launch your job? It'll be exactly the same as if you executed it from the SQL Server console.
SqlCommand[^] class docs
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 12:56 Wednesday 12th July, 2006
|
|
|
|
|
The Job is going to execute ssis Package and that package takes particular .txt file as input and insert those rows from .txt to sql server table.Due to client requirement i can't run that from sql server console directly.I have to execute Job from browser(say asp.net(vb.net code)) and it starts up the job and job execute ssis package and that package will do it's process.
|
|
|
|
|
The Job is going to execute ssis Package and that package takes particular .txt file as input and insert those rows from .txt to sql server table.Due to client requirement i can't run that from sql server console directly.I have to execute Job from browser(say asp.net(vb.net code)) and it starts up the job and job execute ssis package and that package will do it's process.
montu3377
|
|
|
|
|
The Job is going to execute ssis Package and that package takes particular .txt file as input and insert those rows from .txt to sql server table.Due to client requirement i can't run that from sql server console directly.I have to execute Job from browser(say asp.net(vb.net code)) and it starts up the job and job execute ssis package and that package will do it's process.
montu3377
|
|
|
|
|
You didn't understand what I said. A large part of the SQL specification says that the server must be administerable by the very SQL language that it uses to read and write user databases.
IF you were to run the job on from the Server console, what is the SQL command you type to get it to launch your job with all of your parameters, if any??
That's the command you use in the SqlCommand object that's inside your webpage VB.NET code! Other than that command, the rest is just like executing any other SQL query against a database.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Upto now what i understood is like:
My asp.net code execute server Console and that server console application execute the Job and then Job will execute package.
Is it true?am i misunderstand anything upto here??
Now here regarding passing Sql command object from asp.net code ,i think i have to pass name of the textfile as input.Now answer of read and write user database then that user has full rights to read and write.
Do you have any snappet code/articles which describe scenerio??
thanks
montu3377
|
|
|
|
|
montu3377 wrote: My asp.net code execute server Console and that server console application execute the Job and then Job will execute package.
No... How does your application request data from a database? Using a SELECT statement, right? How do you execute a SELECT statement and return a dataset? Same thing, only your not using a SELECT statement, you're using whatever SQL command launches your job on the server!
montu3377 wrote: Do you have any snappet code/articles which describe scenerio??
Nope.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
If your using .net, use the Rijndael Class to encrypt and decrypt files.
|
|
|
|
|
any sample code to see?...or any links useful..i nd to know how to do tt too
|
|
|
|
|
LifeIsSad wrote: any sample code to see?...
Sorry, I'm actually a C/C++ programmer so I don't have any VB code for you, although MSDN Library[^] has a section on the Rijndael Class.
If you search here on CP you might find some code that simplifies the process for you.
|
|
|
|
|
|
ok...thanks bro...gud luck
|
|
|
|
|
or mayb u hav ani c prgming codes for us to reference on encrpy and decryp?
|
|
|
|
|
Here[^] is a C++ library which will use the .net Rijndael class to encrypt or decrypt a file.
If I remember correctly, You just have to pass one call with the file to encrypt and the destination path, and It will complete all of the encryption for you.
|
|
|
|