[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB.Net Global Variable

Posted on 2006-04-17
3
Medium Priority
?
222 Views
Last Modified: 2010-04-17
I have create a module namely globalvariable and want to create a global variable namely SQL type string when i am doing this it is showing errro on Global:

global SQL as string

I also want to use this variable on my form like this

SQL = "select * from userstable where username ='" & TextBox1.Text & "'"

in above statement it is showing error on SQL

Please guide how to create global variable and how could we call it on any form.

Rgds. Mehram
0
Comment
Question by:Mehram
  • 3
3 Comments
 
LVL 16

Expert Comment

by:suprapto45
ID: 16467520
Hi again,

What is the error message?

David
0
 
LVL 16

Accepted Solution

by:
suprapto45 earned 2000 total points
ID: 16467521
In your module,

Try to use
Public SQL as string

instead of
global SQL as string

David
0
 
LVL 16

Expert Comment

by:suprapto45
ID: 16467564
Glad I could help again ;).

David
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Six Sigma Control Plans
Screencast - Getting to Know the Pipeline

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question