Hi Daniweb users :)

Im having a problem over here :(

Im developing a application on VB and currently using MySQL to connect to a online database
but Microsoft(on Albania) wanted us to change from SQL to MySQL data.

I HAVE ABSOLUTELY NO IDEA WHAT THE SYNTAX OF CONNECTING SHOULD BE

after done some researches I saw that SQL was easier than MySQL for me (pretty basic)
but on all videos or tuttorials there was no one who could show how to connect to a online database.
I mean the server can be a cities far from mine and I can connect to the data.

I may use my other pc. Im going to format it now so can use it only as a data server.

can you guys help me with any idea please?

PS: is it possible to turn a home pc to a Data base as Im searching to do?

Edit:

somewhere on internet found this code

Dim Sqlconn As New SqlConnection("Server=:serverip:;Database=:DB:; uid= :uid:; pwd=:pwd:;")

how to configure with this? the soem syntax as MySQL?

first of all. thanks for replying,

2nd: I know that page. and that is for MySQL. I need SQL strings.

I may be able to help but I'm not clear on what you are actually asking for. Can you clarify/summarise what you need?

Im creating a project for Imagine Cup even (National competition) Currently using MySQL for online database, but Microsoft want me to use SQL. is their event so would be better to use theirs products they said.

so I have no idea how to configure my application on a SQL online database.

dont know the connection string.

cant find any free SQL server online (even just for testing)
and what I saw microsoft azure offer a free month for this but the event here is after a month and a half, so the database wont be ready for that time.

what I saw the prices on internet me and my friend dont want to purchase any database because not sure if we will use this after this competition. but SQL syntax looks much more easier than MySQL (at last for me, what Im seeing on web pages)

so I have my old pc (1gb procesor, 3gb ram, dual core, 150gb with what I remember) and want to turn it to a temporary data server, to connect my application with it using his IP.

is that possible?
if yes, do you have any idea how? or can you help me please?

I know that page. and that is for MySQL. I need SQL strings.

Sorry. That was unclear because you stated both

currently using MySQL

and

wanted us to change from SQL to MySQL data.

and I was in a bit of a hurry at the time that I posted. The SQL reference is here. You can try

Dim constr As String = "Driver={SQL Server};Server=SERVER;Database=DATABASE;Uid=USERNAME;Pwd=PASSWORD;"

Just plug in your values for SERVER, DATABASE, USERNAME and PASSWORD.

I figure that out, but I dont understand what to put at {SQL Server}; and at SERVER

IP adress? PC name? or anything else? Im confused. and getting stressed :(

As a first try I would just put in the IP address. That's what I did when testing a new SQL server at work. Of course, everything was on the same LAN and domain. I don't know how that will work for you but it's worth a try.

well it worth to try, but Im not finding a way how to make my other pc a SQL data server...

see many videos who download Microsoft Sever

others do on other ways.. just got confused

I run SQL Server on the same machine (laptop) I use for everything else.

You can run it on a PC or Server. There are different versions. There are all the express versions which I think are free and then for the full blown software you even get developer and server versions.

For the connection string, below is a real example from one of my projects.

"data source=Holly;initial catalog=Paxium;persist security info=True;user id=fred;password=MyPassword"

The data source can be anything which resolves to an IP address. So you can use an actual IP address or a computer name or a url - doesn't matter as long as it resolves ok.

Initial Catalog is the database name, user id is the user name in SQL Server and password is it's password in SQL Server.

You will often need to enable the right protocols when installing a new SQL instance - https://www.simple-talk.com/sql/database-administration/provisioning-a-new-sql-server-instance-%E2%80%93-part-three/

You will also need to make sure any firewalls are open for port 1433.

Hope that helps.

thank you really much for that Dave

but what procedures do I have to do to turn my pc into a server? just have to install Microsoft Server? (with my idea Im sure that is not the only procedure I have to do)

have and a question for you sir. how to create couple databases from the other computer? using SQL server managment studio? as procedure is the some as online server for MySQL I guess? or is any other way

Is there any way we can talk more? on skype?

Yes you just install SQL Server and the couple of other steps I mentioned, that's all.

You can try me on skype but not today as I'm working. Tomorrow is ok though.

sure :)
can you give me your Skype ID please?

I recommend you also install SQL Server Manage Studio Express (free). It will make creating/managing database much easier, and also provides an interactive environment for creating/running queries. Great for debugging.

if I create a database there, and complete everything(tables etc)

if use

"data source=Holly;initial catalog=Paxium;persist security info=True;user id=fred;password=MyPassword"

as Dave said. put computer IP, database UserID and password

my application will be connected to my database?

PS: sorry for asking such a dumb question but never worked with SQL before, we all start as "idiots" somewhere.

My Skype name is dave_amour

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.